]>
Commit | Line | Data |
---|---|---|
615a6cac AD |
1 | <?php |
2 | class No_Iframes extends Plugin { | |
3 | private $host; | |
4 | ||
5 | function about() { | |
6 | return array(1.0, | |
7 | "Remove embedded iframes", | |
8 | "fox"); | |
9 | } | |
10 | ||
11 | function init($host) { | |
12 | $this->host = $host; | |
13 | ||
14 | $host->add_hook($host::HOOK_SANITIZE, $this); | |
15 | } | |
16 | ||
17 | function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes) { | |
18 | ||
19 | $allowed_elements = array_diff($allowed_elements, array("iframe")); | |
20 | ||
21 | return array($doc, $allowed_elements, $disallowed_attributes); | |
22 | } | |
23 | ||
24 | function api_version() { | |
25 | return 2; | |
26 | } | |
27 | ||
28 | } | |
29 | ?> |