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.

25 line
522B

  1. <?php
  2. /**
  3. * Module adds the target=blank attribute transformation to a tags. It
  4. * is enabled by HTML.TargetBlank
  5. */
  6. class HTMLPurifier_HTMLModule_TargetBlank extends HTMLPurifier_HTMLModule
  7. {
  8. /**
  9. * @type string
  10. */
  11. public $name = 'TargetBlank';
  12. /**
  13. * @param HTMLPurifier_Config $config
  14. */
  15. public function setup($config)
  16. {
  17. $a = $this->addBlankElement('a');
  18. $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank();
  19. }
  20. }
  21. // vim: et sw=4 sts=4