Name.php 757 B

12345678910111213141516171819202122232425262728293031323334
  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. /**
  8. * @type string
  9. */
  10. public $name = 'Tidy_Name';
  11. /**
  12. * @type string
  13. */
  14. public $defaultLevel = 'heavy';
  15. /**
  16. * @return array
  17. */
  18. public function makeFixes()
  19. {
  20. $r = array();
  21. // @name for img, a -----------------------------------------------
  22. // Technically, it's allowed even on strict, so we allow authors to use
  23. // it. However, it's deprecated in future versions of XHTML.
  24. $r['img@name'] =
  25. $r['a@name'] = new HTMLPurifier_AttrTransform_Name();
  26. return $r;
  27. }
  28. }
  29. // vim: et sw=4 sts=4