Name.php 583 B

123456789101112131415161718192021
  1. <?php
  2. class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule
  3. {
  4. public $name = 'Name';
  5. public function setup($config) {
  6. $elements = array('a', 'applet', 'form', 'frame', 'iframe', 'img', 'map');
  7. foreach ($elements as $name) {
  8. $element = $this->addBlankElement($name);
  9. $element->attr['name'] = 'CDATA';
  10. if (!$config->get('HTML.Attr.Name.UseCDATA')) {
  11. $element->attr_transform_post['NameSync'] = new HTMLPurifier_AttrTransform_NameSync();
  12. }
  13. }
  14. }
  15. }
  16. // vim: et sw=4 sts=4