TargetBlank.php 426 B

12345678910111213141516171819
  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. public $name = 'TargetBlank';
  9. public function setup($config) {
  10. $a = $this->addBlankElement('a');
  11. $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank();
  12. }
  13. }
  14. // vim: et sw=4 sts=4