mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-21 03:01:29 +00:00
reimplement HOOK_SANITIZE (plugs before final removal of harmful tags)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user