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.

26 lines
507B

  1. <?php
  2. /**
  3. * Module adds the nofollow attribute transformation to a tags. It
  4. * is enabled by HTML.Nofollow
  5. */
  6. class HTMLPurifier_HTMLModule_Nofollow extends HTMLPurifier_HTMLModule
  7. {
  8. /**
  9. * @type string
  10. */
  11. public $name = 'Nofollow';
  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_Nofollow();
  19. }
  20. }
  21. // vim: et sw=4 sts=4