/plugins/vjCommentPlugin/lib/tools/htmlpurifier/library/HTMLPurifier/HTMLModule/Presentation.php

https://bitbucket.org/Kudlaty/360kdw · PHP · 36 lines · 20 code · 5 blank · 11 comment · 0 complexity · e503304a642c6786f6a11eb3ead87ddd MD5 · raw file

  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