From: Andrew Dolgov Date: Thu, 1 Aug 2013 08:52:51 +0000 (+0400) Subject: add no_iframes plugin X-Git-Tag: 1.10~49 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=615a6cac60b145a26b5b0c1fd41993c502030756;p=tt-rss.git add no_iframes plugin --- diff --git a/plugins/no_iframes/init.php b/plugins/no_iframes/init.php new file mode 100644 index 00000000..c66d7aba --- /dev/null +++ b/plugins/no_iframes/init.php @@ -0,0 +1,29 @@ +host = $host; + + $host->add_hook($host::HOOK_SANITIZE, $this); + } + + function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes) { + + $allowed_elements = array_diff($allowed_elements, array("iframe")); + + return array($doc, $allowed_elements, $disallowed_attributes); + } + + function api_version() { + return 2; + } + +} +?>