From 43ca21cfbdb6a9419b6fc1ade9523f4c81bc58e8 Mon Sep 17 00:00:00 2001 From: Nick Palmer Date: Thu, 17 May 2007 14:14:31 +0000 Subject: Integrate HTMLPurifier into liberty. --- plugins/format.tikiwiki.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'plugins/format.tikiwiki.php') diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php index df591e7..e2fd12a 100644 --- a/plugins/format.tikiwiki.php +++ b/plugins/format.tikiwiki.php @@ -1,6 +1,6 @@ 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( '/\/', $acceptableTags ) ) { - $data = preg_replace( "/(\)/si", '', $data ); - } - - $data = strip_tags( $data, $acceptableTags ); + $data = $gLibertySystem->purifyHtml($data); } elseif( !$gBitSystem->isFeatureActive( 'content_allow_html' ) ) { // convert HTML to chars $data = htmlspecialchars( $data, ENT_NOQUOTES, 'UTF-8' ); -- cgit v1.3