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.

44 line
906B

  1. <?php
  2. class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4
  3. {
  4. /**
  5. * @type string
  6. */
  7. public $name = 'Tidy_Strict';
  8. /**
  9. * @type string
  10. */
  11. public $defaultLevel = 'light';
  12. /**
  13. * @return array
  14. */
  15. public function makeFixes()
  16. {
  17. $r = parent::makeFixes();
  18. $r['blockquote#content_model_type'] = 'strictblockquote';
  19. return $r;
  20. }
  21. /**
  22. * @type bool
  23. */
  24. public $defines_child_def = true;
  25. /**
  26. * @param HTMLPurifier_ElementDef $def
  27. * @return HTMLPurifier_ChildDef_StrictBlockquote
  28. */
  29. public function getChildDef($def)
  30. {
  31. if ($def->content_model_type != 'strictblockquote') {
  32. return parent::getChildDef($def);
  33. }
  34. return new HTMLPurifier_ChildDef_StrictBlockquote($def->content_model);
  35. }
  36. }
  37. // vim: et sw=4 sts=4