summaryrefslogtreecommitdiff
path: root/plugins/format.tikiwiki.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-04-29 16:02:18 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-04-29 16:02:18 +0000
commitf3b838f69f744a64211396363a89a5fa5656bb65 (patch)
treed45d5c24c1331f9290d505bdc5487d1f2cc05bd3 /plugins/format.tikiwiki.php
parent6168d0c6a4f767ab77f61eaf1f6000906a0f9286 (diff)
downloadliberty-f3b838f69f744a64211396363a89a5fa5656bb65.tar.gz
liberty-f3b838f69f744a64211396363a89a5fa5656bb65.tar.bz2
liberty-f3b838f69f744a64211396363a89a5fa5656bb65.zip
make it possible to store html data on a per page basis
Diffstat (limited to 'plugins/format.tikiwiki.php')
-rw-r--r--plugins/format.tikiwiki.php35
1 files changed, 17 insertions, 18 deletions
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php
index f9ec599..705da72 100644
--- a/plugins/format.tikiwiki.php
+++ b/plugins/format.tikiwiki.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.49 $
+ * @version $Revision: 1.50 $
* @package liberty
*/
global $gLibertySystem;
@@ -700,23 +700,22 @@ class TikiWikiParser extends BitBase {
$pageList = $this->getAllPages( $pContentId );
// 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' );
+ if( $pCommonObject->getPreference( 'content_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' );
+ }
// Process pre_handlers here
foreach ($this->pre_handlers as $handler) {