From 7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 May 2012 17:57:41 -0700 Subject: some important stuff we'll need --- .../library/HTMLPurifier/HTMLModule/List.php | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lib/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php (limited to 'lib/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php') diff --git a/lib/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php b/lib/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php new file mode 100644 index 000000000..79ccefafd --- /dev/null +++ b/lib/htmlpurifier/library/HTMLPurifier/HTMLModule/List.php @@ -0,0 +1,43 @@ + 'List'); + + public function setup($config) { + $ol = $this->addElement('ol', 'List', new HTMLPurifier_ChildDef_List(), 'Common'); + $ul = $this->addElement('ul', 'List', new HTMLPurifier_ChildDef_List(), 'Common'); + // XXX The wrap attribute is handled by MakeWellFormed. This is all + // quite unsatisfactory, because we generated this + // *specifically* for lists, and now a big chunk of the handling + // is done properly by the List ChildDef. So actually, we just + // want enough information to make autoclosing work properly, + // and then hand off the tricky stuff to the ChildDef. + $ol->wrap = 'li'; + $ul->wrap = 'li'; + $this->addElement('dl', 'List', 'Required: dt | dd', 'Common'); + + $this->addElement('li', false, 'Flow', 'Common'); + + $this->addElement('dd', false, 'Flow', 'Common'); + $this->addElement('dt', false, 'Inline', 'Common'); + } + +} + +// vim: et sw=4 sts=4 -- cgit v1.2.3