Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / lib / htmlpurifier / HTMLPurifier / HTMLModule / Presentation.php
blob5c80db407b1a068ae2848d46130347c700845598
1 <?php
3 require_once 'HTMLPurifier/HTMLModule.php';
5 /**
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
9 * two modules:
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(
21 'Block' => 'hr',
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';
31 } else {
32 $this->info[$element]->content_model = '#PCDATA | Inline';
33 $this->info[$element]->content_model_type = 'optional';