]> git.wh0rd.org - tt-rss.git/blob - lib/htmlpurifier/library/HTMLPurifier/HTMLModule/Iframe.php
287071edf2293c5959ed71f65b7db9fc3561f41e
[tt-rss.git] / lib / htmlpurifier / library / HTMLPurifier / HTMLModule / Iframe.php
1 <?php
2
3 /**
4 * XHTML 1.1 Iframe Module provides inline frames.
5 *
6 * @note This module is not considered safe unless an Iframe
7 * whitelisting mechanism is specified. Currently, the only
8 * such mechanism is %URL.SafeIframeRegexp
9 */
10 class HTMLPurifier_HTMLModule_Iframe extends HTMLPurifier_HTMLModule
11 {
12
13 public $name = 'Iframe';
14 public $safe = false;
15
16 public function setup($config) {
17 if ($config->get('HTML.SafeIframe')) {
18 $this->safe = true;
19 }
20 $this->addElement(
21 'iframe', 'Inline', 'Flow', 'Common',
22 array(
23 'src' => 'URI#embedded',
24 'width' => 'Length',
25 'height' => 'Length',
26 'name' => 'ID',
27 'scrolling' => 'Enum#yes,no,auto',
28 'frameborder' => 'Enum#0,1',
29 'longdesc' => 'URI',
30 'marginheight' => 'Pixels',
31 'marginwidth' => 'Pixels',
32 )
33 );
34 }
35
36 }
37
38 // vim: et sw=4 sts=4