File indexing completed on 2025-01-26 05:29:07
0001 <?php 0002 0003 class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule 0004 { 0005 /** 0006 * @type string 0007 */ 0008 public $name = 'Name'; 0009 0010 /** 0011 * @param HTMLPurifier_Config $config 0012 */ 0013 public function setup($config) 0014 { 0015 $elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map'); 0016 foreach ($elements as $name) { 0017 $element = $this->addBlankElement($name); 0018 $element->attr['name'] = 'CDATA'; 0019 if (!$config->get('HTML.Attr.Name.UseCDATA')) { 0020 $element->attr_transform_post[] = new HTMLPurifier_AttrTransform_NameSync(); 0021 } 0022 } 0023 } 0024 } 0025 0026 // vim: et sw=4 sts=4