diff options
| author | 2013-12-23 13:22:50 +0100 | |
|---|---|---|
| committer | 2013-12-23 13:22:50 +0100 | |
| commit | 24d9d1628d673f68fa0cc7b98a3ef9a8d021b070 (patch) | |
| tree | 2d794dc100d707e53b82a2de7d84b3d13103e461 /lib/SimplePie/SimplePie.php | |
| parent | 75096e6a39fe5d34d3951991f296f616e62a9fd8 (diff) | |
| parent | 9e46c1ee7fc7f9ad9e2c07f0cf826573dd4c9766 (diff) | |
Fusion 0.7-dev
Diffstat (limited to 'lib/SimplePie/SimplePie.php')
| -rw-r--r-- | lib/SimplePie/SimplePie.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php index 9e532023a..d20ab5430 100644 --- a/lib/SimplePie/SimplePie.php +++ b/lib/SimplePie/SimplePie.php @@ -602,6 +602,13 @@ class SimplePie public $strip_attributes = array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc'); /** + * @var array Stores the default attributes to add to differet tags by add_attributes(). + * @see SimplePie::add_attributes() + * @access private + */ + public $add_attributes = array('audio' => array('preload' => 'none'), 'iframe' => array('sandbox' => 'allow-scripts allow-same-origin'), 'video' => array('preload' => 'none')); //FreshRSS + + /** * @var array Stores the default tags to be stripped by strip_htmltags(). * @see SimplePie::strip_htmltags() * @access private @@ -1073,6 +1080,7 @@ class SimplePie $this->strip_comments(false); $this->strip_htmltags(false); $this->strip_attributes(false); + $this->add_attributes(false); $this->set_image_handler(false); } } @@ -1119,6 +1127,15 @@ class SimplePie $this->sanitize->strip_attributes($attribs); } + public function add_attributes($attribs = '') + { + if ($attribs === '') + { + $attribs = $this->add_attributes; + } + $this->sanitize->add_attributes($attribs); + } + /** * Set the output encoding * |
