summaryrefslogtreecommitdiff
path: root/plugins/OStatus/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 23:39:40 +0000
committerBrion Vibber <brion@pobox.com>2010-02-24 23:39:40 +0000
commite18e659ca3b40ade283f51c91a263507d7c6694e (patch)
treee2852ba5c01d4125e802dd6fd5c66980b0b7d114 /plugins/OStatus/classes
parent93507a192755494417eb0433edd315880752c857 (diff)
Drop HTMLPurifier; we don't need its extra capabilities and we're already using htmLawed which is lighter-weight.
Diffstat (limited to 'plugins/OStatus/classes')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php25
1 files changed, 3 insertions, 22 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 33b0ceb9e..a366c1c2c 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -668,28 +668,9 @@ class Ostatus_profile extends Memcached_DataObject
*/
protected function purify($html)
{
- require_once(INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php');
-
- // By default Purifier wants to cache data to its own code directories,
- // and spews error messages if they're not writable.
- $config = HTMLPurifier_Config::createDefault();
- if (common_config('ostatus', 'purify_cache')) {
- $config->set('Cache.SerializerPath', common_config('ostatus', 'purify_cache'));
- } else {
- // Although recommended in the documentation, this produces a notice:
- // "Core.DefinitionCache is an alias, preferred directive name is Cache.DefinitionImpl"
- // If I then follow *those* directions, I get a warning and it doesn't work:
- // "Cannot set undefined directive Core.DefinitionImpl"
- // So... lesser of two evils. Suppressing the notice from output,
- // though it'll still be seen and logged by StatusNet's error handler.
- $old = error_reporting();
- error_reporting($old & ~E_NOTICE);
- $config->set('Core.DefinitionCache', null);
- error_reporting($old);
- }
-
- $purifier = new HTMLPurifier($config);
- return $purifier->purify($html);
+ require_once INSTALLDIR.'/extlib/htmLawed/htmLawed.php';
+ $config = array('safe' => 1);
+ return htmLawed($html, $config);
}
/**