Target.php 599 B

12345678910111213141516171819202122232425262728
  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