File indexing completed on 2024-05-12 06:02:05

0001 <?php
0002 
0003 /**
0004  * XHTML 1.1 Iframe Module provides inline frames.
0005  *
0006  * @note This module is not considered safe unless an Iframe
0007  * whitelisting mechanism is specified.  Currently, the only
0008  * such mechanism is %URL.SafeIframeRegexp
0009  */
0010 class HTMLPurifier_HTMLModule_Iframe extends HTMLPurifier_HTMLModule
0011 {
0012 
0013     /**
0014      * @type string
0015      */
0016     public $name = 'Iframe';
0017 
0018     /**
0019      * @type bool
0020      */
0021     public $safe = false;
0022 
0023     /**
0024      * @param HTMLPurifier_Config $config
0025      */
0026     public function setup($config)
0027     {
0028         if ($config->get('HTML.SafeIframe')) {
0029             $this->safe = true;
0030         }
0031         $this->addElement(
0032             'iframe',
0033             'Inline',
0034             'Flow',
0035             'Common',
0036             array(
0037                 'src' => 'URI#embedded',
0038                 'width' => 'Length',
0039                 'height' => 'Length',
0040                 'name' => 'ID',
0041                 'scrolling' => 'Enum#yes,no,auto',
0042                 'frameborder' => 'Enum#0,1',
0043                 'longdesc' => 'URI',
0044                 'marginheight' => 'Pixels',
0045                 'marginwidth' => 'Pixels',
0046             )
0047         );
0048     }
0049 }
0050 
0051 // vim: et sw=4 sts=4