summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-19 00:00:13 +0400
committerAndrew Dolgov <[email protected]>2013-03-19 00:00:13 +0400
commitbe124dc2361539455121fa29c77bf60a85014b13 (patch)
tree900a8059e023a2646f712a0ebc9e69f3b5e40429 /include
parent2130fe7a18d7e1863575feda9ec39654541eee77 (diff)
Revert "add experimental HOOK_SANITIZE"
This reverts commit 2130fe7a18d7e1863575feda9ec39654541eee77.
Diffstat (limited to 'include')
-rw-r--r--include/functions.php23
1 files changed, 5 insertions, 18 deletions
diff --git a/include/functions.php b/include/functions.php
index ae9561337..2120a96b9 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -2597,25 +2597,12 @@
//$node = $doc->getElementsByTagName('body')->item(0);
+ $doc->removeChild($doc->firstChild); //remove doctype
+ $res = $doc->saveHTML();
- $beforehooks = $res;
-
- global $pluginhost;
- if ($pluginhost) {
- foreach ($pluginhost->get_hooks($pluginhost::HOOK_SANITIZE) as $p) {
- $res = $p->hook_sanitize($res);
- }
- }
-
- // nothing changed, use standard filters
- if ($beforehooks == $res) {
- $doc->removeChild($doc->firstChild); //remove doctype
- $res = $doc->saveHTML();
-
- $config = array('safe' => 1, 'deny_attribute' => 'style, width, height, class, id', 'comment' => 1, 'cdata' => 1, 'balance' => 0);
- $spec = 'img=width,height';
- $res = htmLawed($res, $config, $spec);
- }
+ $config = array('safe' => 1, 'deny_attribute' => 'style, width, height, class, id', 'comment' => 1, 'cdata' => 1, 'balance' => 0);
+ $spec = 'img=width,height';
+ $res = htmLawed($res, $config, $spec);
return $res;
}