From 615a6cac60b145a26b5b0c1fd41993c502030756 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 1 Aug 2013 12:52:51 +0400 Subject: add no_iframes plugin --- plugins/no_iframes/init.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 plugins/no_iframes/init.php (limited to 'plugins') diff --git a/plugins/no_iframes/init.php b/plugins/no_iframes/init.php new file mode 100644 index 000000000..c66d7abaf --- /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; + } + +} +?> -- cgit v1.2.3