You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
669B

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