diff options
| author | wjames5 <will@tekimaki.com> | 2009-05-27 17:12:30 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2009-05-27 17:12:30 +0000 |
| commit | 7c7635f0578ae302f9df20758c908bd689401711 (patch) | |
| tree | 7f4de17c0ce8b0ef44bfbbf9a2ea78e614c16efb | |
| parent | 7e5868760ca9bb92a4a1950707f858eca0fb2dca (diff) | |
| download | liberty-7c7635f0578ae302f9df20758c908bd689401711.tar.gz liberty-7c7635f0578ae302f9df20758c908bd689401711.tar.bz2 liberty-7c7635f0578ae302f9df20758c908bd689401711.zip | |
add cnbc plugin for htmlpure
| -rw-r--r-- | admin/plugins/filter_htmlpurifier.php | 5 | ||||
| -rw-r--r-- | 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 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_liberty/plugins/filter.htmlpurifier.php,v 1.25 2008/11/29 05:38:58 wjames5 Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/plugins/filter.htmlpurifier.php,v 1.26 2009/05/27 17:12:30 wjames5 Exp $ * @package liberty * @subpackage plugins_filter */ @@ -172,12 +172,22 @@ function htmlpure_getDefaultConfig( &$htmlp_version ){ // TODO: devise a way to parse plugins dir // and check for the right property here // so new plugins are just drop in place. + $custom_filters = array(); if ( $htmlp_version >= 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-> |
