Name.php 645 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Name is deprecated, but allowed in strict doctypes, so onl
  4. */
  5. class HTMLPurifier_HTMLModule_Tidy_Name extends HTMLPurifier_HTMLModule_Tidy
  6. {
  7. public $name = 'Tidy_Name';
  8. public $defaultLevel = 'heavy';
  9. public function makeFixes() {
  10. $r = array();
  11. // @name for img, a -----------------------------------------------
  12. // Technically, it's allowed even on strict, so we allow authors to use
  13. // it. However, it's deprecated in future versions of XHTML.
  14. $r['img@name'] =
  15. $r['a@name'] = new HTMLPurifier_AttrTransform_Name();
  16. return $r;
  17. }
  18. }
  19. // vim: et sw=4 sts=4