Presentation.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * XHTML 1.1 Presentation Module, defines simple presentation-related
  4. * markup. Text Extension Module.
  5. * @note The official XML Schema and DTD specs further divide this into
  6. * two modules:
  7. * - Block Presentation (hr)
  8. * - Inline Presentation (b, big, i, small, sub, sup, tt)
  9. * We have chosen not to heed this distinction, as content_sets
  10. * provides satisfactory disambiguation.
  11. */
  12. class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule
  13. {
  14. public $name = 'Presentation';
  15. public function setup($config) {
  16. $this->addElement('hr', 'Block', 'Empty', 'Common');
  17. $this->addElement('sub', 'Inline', 'Inline', 'Common');
  18. $this->addElement('sup', 'Inline', 'Inline', 'Common');
  19. $b = $this->addElement('b', 'Inline', 'Inline', 'Common');
  20. $b->formatting = true;
  21. $big = $this->addElement('big', 'Inline', 'Inline', 'Common');
  22. $big->formatting = true;
  23. $i = $this->addElement('i', 'Inline', 'Inline', 'Common');
  24. $i->formatting = true;
  25. $small = $this->addElement('small', 'Inline', 'Inline', 'Common');
  26. $small->formatting = true;
  27. $tt = $this->addElement('tt', 'Inline', 'Inline', 'Common');
  28. $tt->formatting = true;
  29. }
  30. }
  31. // vim: et sw=4 sts=4