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.

29 lines
599B

  1. <?php
  2. /**
  3. * XHTML 1.1 Target Module, defines target attribute in link elements.
  4. */
  5. class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule
  6. {
  7. /**
  8. * @type string
  9. */
  10. public $name = 'Target';
  11. /**
  12. * @param HTMLPurifier_Config $config
  13. */
  14. public function setup($config)
  15. {
  16. $elements = array('a');
  17. foreach ($elements as $name) {
  18. $e = $this->addBlankElement($name);
  19. $e->attr = array(
  20. 'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget()
  21. );
  22. }
  23. }
  24. }
  25. // vim: et sw=4 sts=4