1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00
ttrss_ynh/source/plugins/no_iframes/init.php

30 lines
516 B
PHP
Raw Normal View History

2013-11-24 11:03:28 +01:00
<?php
class No_Iframes extends Plugin {
private $host;
function about() {
return array(1.0,
"Remove embedded iframes",
"fox");
}
function init($host) {
$this->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;
}
}
?>