2007-02-04 01:52:13 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once 'HTMLPurifier/HTMLModule.php';
|
|
|
|
|
|
|
|
/**
|
2007-02-04 04:41:34 +00:00
|
|
|
* XHTML 1.1 List Module, defines list-oriented elements. Core Module.
|
2007-02-04 01:52:13 +00:00
|
|
|
*/
|
|
|
|
class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule
|
|
|
|
{
|
|
|
|
|
2007-02-14 22:30:17 +00:00
|
|
|
var $name = 'List';
|
2007-04-11 21:44:26 +00:00
|
|
|
|
2007-02-04 20:09:35 +00:00
|
|
|
// According to the abstract schema, the List content set is a fully formed
|
2007-02-04 01:52:13 +00:00
|
|
|
// one or more expr, but it invariably occurs in an optional declaration
|
|
|
|
// so we're not going to do that subtlety. It might cause trouble
|
|
|
|
// if a user defines "List" and expects that multiple lists are
|
|
|
|
// allowed to be specified, but then again, that's not very intuitive.
|
2007-02-04 20:09:35 +00:00
|
|
|
// Furthermore, the actual XML Schema may disagree. Regardless,
|
|
|
|
// we don't have support for such nested expressions without using
|
|
|
|
// the incredibly inefficient and draconic Custom ChildDef.
|
2007-05-09 22:01:07 +00:00
|
|
|
|
|
|
|
var $content_sets = array('Flow' => 'List');
|
2007-02-04 01:52:13 +00:00
|
|
|
|
|
|
|
function HTMLPurifier_HTMLModule_List() {
|
2007-05-11 00:54:04 +00:00
|
|
|
$this->addElement('ol', true, 'List', 'Required: li', 'Common');
|
|
|
|
$this->addElement('ul', true, 'List', 'Required: li', 'Common');
|
|
|
|
$this->addElement('dl', true, 'List', 'Required: dt | dd', 'Common');
|
2007-05-09 22:01:07 +00:00
|
|
|
|
2007-06-23 20:52:57 +00:00
|
|
|
$this->addElement('li', true, false, 'Flow', 'Common');
|
2007-05-09 22:01:07 +00:00
|
|
|
|
2007-05-11 00:54:04 +00:00
|
|
|
$this->addElement('dd', true, false, 'Flow', 'Common');
|
|
|
|
$this->addElement('dt', true, false, 'Inline', 'Common');
|
2007-02-04 01:52:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|