]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
reimplement HOOK_SANITIZE (plugs before final removal of harmful tags)
[tt-rss.git] / include / functions.php
index 3793e042634ffb35eb94958b79c6c6e001d2cabb..d1743af7a09ac13ac655531a0942df232cecdae7 100644 (file)
                        $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();