3 require_once 'HTMLPurifier/HTMLModule.php';
6 * XHTML 1.1 Presentation Module, defines simple presentation-related
7 * markup. Text Extension Module.
8 * @note The official XML Schema and DTD specs further divide this into
10 * - Block Presentation (hr)
11 * - Inline Presentation (b, big, i, small, sub, sup, tt)
12 * We have chosen not to heed this distinction, as content_sets
13 * provides satisfactory disambiguation.
15 class HTMLPurifier_HTMLModule_Presentation
extends HTMLPurifier_HTMLModule
18 var $name = 'Presentation';
19 var $elements = array('b', 'big', 'hr', 'i', 'small', 'sub', 'sup', 'tt');
20 var $content_sets = array(
22 'Inline' => 'b | big | i | small | sub | sup | tt'
25 function HTMLPurifier_HTMLModule_Presentation() {
26 foreach ($this->elements
as $element) {
27 $this->info
[$element] = new HTMLPurifier_ElementDef();
28 $this->info
[$element]->attr
= array(0 => array('Common'));
29 if ($element == 'hr') {
30 $this->info
[$element]->content_model_type
= 'empty';
32 $this->info
[$element]->content_model
= '#PCDATA | Inline';
33 $this->info
[$element]->content_model_type
= 'optional';