diff options
author | Andrew Dolgov <[email protected]> | 2013-03-19 18:58:42 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-19 19:00:18 +0400 |
commit | e9b86f0a1c6165f4f06b1f7909889abfea96b620 (patch) | |
tree | 22184d7c504cfbd4d06cac8d6cb9b30b45fd379f /include/functions.php | |
parent | 1d5cf085a37e8e016242c9cfea631a90861ab306 (diff) |
reimplement HOOK_SANITIZE (plugs before final removal of harmful tags)
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index 3793e0426..d1743af7a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2615,6 +2615,14 @@ $entry->setAttribute('sandbox', true); } + global $pluginhost; + + if (isset($pluginhost)) { + foreach ($pluginhost->get_hooks($pluginhost::HOOK_SANITIZE) as $plugin) { + $doc = $plugin->hook_sanitize($doc, $site_url); + } + } + $doc->removeChild($doc->firstChild); //remove doctype $doc = strip_harmful_tags($doc); $res = $doc->saveHTML(); |