summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-04-25 17:42:24 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-04-25 17:42:24 +0000
commit94a6775717822ad403da6549785cbfefcd2a6c9d (patch)
treed122cbda614e38d5c1ea6f5d4422e0eca0eb505d
parent66bb48c9be940ec026c5e0885974be99aaf48380 (diff)
downloadliberty-94a6775717822ad403da6549785cbfefcd2a6c9d.tar.gz
liberty-94a6775717822ad403da6549785cbfefcd2a6c9d.tar.bz2
liberty-94a6775717822ad403da6549785cbfefcd2a6c9d.zip
disable html in tikiwiki pages for now. very disruptive and should be changed into a per page setting
-rw-r--r--plugins/format.tikiwiki.php36
1 files changed, 19 insertions, 17 deletions
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php
index 084c448..f9ec599 100644
--- a/plugins/format.tikiwiki.php
+++ b/plugins/format.tikiwiki.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.48 $
+ * @version $Revision: 1.49 $
* @package liberty
*/
global $gLibertySystem;
@@ -699,22 +699,24 @@ class TikiWikiParser extends BitBase {
// get a list of pages this page links to
$pageList = $this->getAllPages( $pContentId );
- if( $gBitUser->hasPermission( 'p_liberty_enter_html' ) ) {
- // this is copied and pasted from format.bithtml.php - xing
- // Strip all evil tags that remain
- // this comes out of gBitSystem->getConfig() set in Liberty Admin
- $acceptableTags = $gBitSystem->getConfig( 'approved_html_tags', DEFAULT_ACCEPTABLE_TAGS );
-
- // Destroy all script code "manually" - strip_tags will leave code inline as plain text
- if( !preg_match( '/\<script\>/', $acceptableTags ) ) {
- $data = preg_replace( "/(\<script)(.*?)(script\>)/si", '', $data );
- }
-
- $data = strip_tags( $data, $acceptableTags );
- } else {
- // convert HTML to chars
- $data = htmlspecialchars( $data, ENT_NOQUOTES, 'UTF-8' );
- }
+ // disable HTML in wiki page for now - very disruptive. should be changed into a per page setting - xing
+// if( $gBitUser->hasPermission( 'p_liberty_enter_html' ) ) {
+// // this is copied and pasted from format.bithtml.php - xing
+// // Strip all evil tags that remain
+// // this comes out of gBitSystem->getConfig() set in Liberty Admin
+// $acceptableTags = $gBitSystem->getConfig( 'approved_html_tags', DEFAULT_ACCEPTABLE_TAGS );
+//
+// // Destroy all script code "manually" - strip_tags will leave code inline as plain text
+// if( !preg_match( '/\<script\>/', $acceptableTags ) ) {
+// $data = preg_replace( "/(\<script)(.*?)(script\>)/si", '', $data );
+// }
+//
+// $data = strip_tags( $data, $acceptableTags );
+// } else {
+// // convert HTML to chars
+// $data = htmlspecialchars( $data, ENT_NOQUOTES, 'UTF-8' );
+// }
+ $data = htmlspecialchars( $data, ENT_NOQUOTES, 'UTF-8' );
// Process pre_handlers here
foreach ($this->pre_handlers as $handler) {