summaryrefslogtreecommitdiff
path: root/LibertySystem.php
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-05-18 17:07:16 +0000
committerNick Palmer <nick@sluggardy.net>2007-05-18 17:07:16 +0000
commitfdb7e5c97b83be86817774b6587df033c8285106 (patch)
tree7a82e330b1489286047956b668420bd9efdc8491 /LibertySystem.php
parent072c667fa8f05d6cc67f43b22c88374fe0691890 (diff)
downloadliberty-fdb7e5c97b83be86817774b6587df033c8285106.tar.gz
liberty-fdb7e5c97b83be86817774b6587df033c8285106.tar.bz2
liberty-fdb7e5c97b83be86817774b6587df033c8285106.zip
Add support for passing youtube video through HTMLPurifier.
Diffstat (limited to 'LibertySystem.php')
-rwxr-xr-xLibertySystem.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/LibertySystem.php b/LibertySystem.php
index ae1c0cf..60e6c2a 100755
--- a/LibertySystem.php
+++ b/LibertySystem.php
@@ -3,7 +3,7 @@
* System class for handling the liberty package
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.71 2007/05/18 10:00:00 nickpalmer Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.72 2007/05/18 17:07:13 nickpalmer Exp $
* @author spider <spider@steelsun.com>
*/
@@ -186,7 +186,16 @@ class LibertySystem extends LibertyBase {
}
$gHtmlPurifier = new HTMLPurifier($config);
+
+ // TODO: devise a way to parse plugins dir
+ // and check for the right property here
+ // so new plugins are just drop in place.
+ if ($gBitSystem->isFeatureActive('liberty_html_pure_allow_youtube')) {
+ require_once UTIL_PKG_PATH.'htmlpurifier/HTMLPurifier/Filter/YouTube.php';
+ $gHtmlPurifier->addFilter(new HTMLPurifier_Filter_YouTube());
+ }
}
+
$pString = $gHtmlPurifier->purify($pString);
/* There isn't an easy way to disable an attribute in HTMLPurifier */