From 7c7635f0578ae302f9df20758c908bd689401711 Mon Sep 17 00:00:00 2001 From: wjames5 Date: Wed, 27 May 2009 17:12:30 +0000 Subject: add cnbc plugin for htmlpure --- admin/plugins/filter_htmlpurifier.php | 5 +++++ plugins/filter.htmlpurifier.php | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/admin/plugins/filter_htmlpurifier.php b/admin/plugins/filter_htmlpurifier.php index b69741d..d916692 100644 --- a/admin/plugins/filter_htmlpurifier.php +++ b/admin/plugins/filter_htmlpurifier.php @@ -52,6 +52,11 @@ $htmlPurifier = array( 'note' => 'Allow YouTube videos to be passed through.', 'default' => 'n' ), + 'htmlpure_allow_cnbc' => array( + 'label' => 'Allow CNBC', + 'note' => 'Allow CNBC videos to be passed through.', + 'default' => 'n' + ), 'htmlpure_force_nofollow' => array( 'label' => 'Force No Follow', 'note' => 'Force all anchor tags to have rel=nofollow in them. Many search engines respect this in order to give sites a way to try to avoid link spammers.', diff --git a/plugins/filter.htmlpurifier.php b/plugins/filter.htmlpurifier.php index 16e64c2..861c2ae 100644 --- a/plugins/filter.htmlpurifier.php +++ b/plugins/filter.htmlpurifier.php @@ -1,6 +1,6 @@ = 3.1 ){ if ($gBitSystem->isFeatureActive('htmlpure_allow_youtube')) { require_once(UTIL_PKG_PATH.'htmlpure/Filter/YouTube.php'); - $config->set('Filter', 'Custom', array(new HTMLPurifier_Filter_YouTube())); + $custom_filters[] = new HTMLPurifier_Filter_YouTube(); } + if ($gBitSystem->isFeatureActive('htmlpure_allow_cnbc')) { + require_once(UTIL_PKG_PATH.'htmlpure/Filter/CNBC.php'); + + $custom_filters[] = new HTMLPurifier_Filter_CNBC(); + } + } + + if( !empty( $custom_filters ) ){ + $config->set('Filter', 'Custom', $custom_filters ); } $blacklistedTags = $gBitSystem-> -- cgit v1.3