PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/thirdparty/htmlpurifier-4.0.0-lite/library/HTMLPurifier/HTMLModule/List.php

https://github.com/sheadawson/silverstripe-inlinecomments
PHP | 35 lines | 14 code | 9 blank | 12 comment | 0 complexity | 21bac4a6658e819d2b0c807351f300c1 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. /**
  3. * XHTML 1.1 List Module, defines list-oriented elements. Core Module.
  4. */
  5. class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule
  6. {
  7. public $name = 'List';
  8. // According to the abstract schema, the List content set is a fully formed
  9. // one or more expr, but it invariably occurs in an optional declaration
  10. // so we're not going to do that subtlety. It might cause trouble
  11. // if a user defines "List" and expects that multiple lists are
  12. // allowed to be specified, but then again, that's not very intuitive.
  13. // Furthermore, the actual XML Schema may disagree. Regardless,
  14. // we don't have support for such nested expressions without using
  15. // the incredibly inefficient and draconic Custom ChildDef.
  16. public $content_sets = array('Flow' => 'List');
  17. public function setup($config) {
  18. $this->addElement('ol', 'List', 'Required: li', 'Common');
  19. $this->addElement('ul', 'List', 'Required: li', 'Common');
  20. $this->addElement('dl', 'List', 'Required: dt | dd', 'Common');
  21. $this->addElement('li', false, 'Flow', 'Common');
  22. $this->addElement('dd', false, 'Flow', 'Common');
  23. $this->addElement('dt', false, 'Inline', 'Common');
  24. }
  25. }
  26. // vim: et sw=4 sts=4