diff --git a/library/HTMLPurifier/HTMLModule/Hypertext.php b/library/HTMLPurifier/HTMLModule/Hypertext.php index 37e29653..6052cfae 100644 --- a/library/HTMLPurifier/HTMLModule/Hypertext.php +++ b/library/HTMLPurifier/HTMLModule/Hypertext.php @@ -3,7 +3,7 @@ require_once 'HTMLPurifier/HTMLModule.php'; /** - * XHTML 1.1 Hypertext Module, defines hypertext links. + * XHTML 1.1 Hypertext Module, defines hypertext links. Core Module. */ class HTMLPurifier_HTMLModule_Hypertext extends HTMLPurifier_HTMLModule { diff --git a/library/HTMLPurifier/HTMLModule/List.php b/library/HTMLPurifier/HTMLModule/List.php index fa32029e..55c0909c 100644 --- a/library/HTMLPurifier/HTMLModule/List.php +++ b/library/HTMLPurifier/HTMLModule/List.php @@ -3,7 +3,7 @@ require_once 'HTMLPurifier/HTMLModule.php'; /** - * XHTML 1.1 List Module, defines list-oriented elements. + * XHTML 1.1 List Module, defines list-oriented elements. Core Module. */ class HTMLPurifier_HTMLModule_List extends HTMLPurifier_HTMLModule { diff --git a/library/HTMLPurifier/HTMLModule/Presentation.php b/library/HTMLPurifier/HTMLModule/Presentation.php new file mode 100644 index 00000000..1b05b90b --- /dev/null +++ b/library/HTMLPurifier/HTMLModule/Presentation.php @@ -0,0 +1,33 @@ + 'hr', + 'Inline' => 'b | big | i | small | sub | sup | tt' + ); + + function HTMLPurifier_HTMLModule_Presentation() { + foreach ($this->elements as $element) { + $this->info[$element] = new HTMLPurifier_ElementDef(); + $this->info[$element]->attr = array(0 => array('Common')); + if ($element == 'hr') { + $this->info[$element]->content_model_type = 'empty'; + } else { + $this->info[$element]->content_model = '#PCDATA | Inline'; + $this->info[$element]->content_model_type = 'optional'; + } + } + } + +} + +?> \ No newline at end of file diff --git a/library/HTMLPurifier/HTMLModule/Text.php b/library/HTMLPurifier/HTMLModule/Text.php index 35c9d8ed..2b6a9578 100644 --- a/library/HTMLPurifier/HTMLModule/Text.php +++ b/library/HTMLPurifier/HTMLModule/Text.php @@ -3,7 +3,7 @@ require_once 'HTMLPurifier/HTMLModule.php'; /** - * XHTML 1.1 Text Module, defines basic text containers. Core module. + * XHTML 1.1 Text Module, defines basic text containers. Core Module. */ class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule { diff --git a/library/HTMLPurifier/XHTMLDefinition.php b/library/HTMLPurifier/XHTMLDefinition.php index 38efb64c..f3a730a8 100644 --- a/library/HTMLPurifier/XHTMLDefinition.php +++ b/library/HTMLPurifier/XHTMLDefinition.php @@ -9,6 +9,7 @@ require_once 'HTMLPurifier/HTMLModule.php'; require_once 'HTMLPurifier/HTMLModule/Text.php'; require_once 'HTMLPurifier/HTMLModule/Hypertext.php'; require_once 'HTMLPurifier/HTMLModule/List.php'; +require_once 'HTMLPurifier/HTMLModule/Presentation.php'; /** * Next-generation HTML definition that will supplant HTMLPurifier_HTMLDefinition @@ -26,6 +27,7 @@ class HTMLPurifier_XHTMLDefinition extends HTMLPurifier_HTMLDefinition $this->modules['Text'] = new HTMLPurifier_HTMLModule_Text(); $this->modules['Hypertext'] = new HTMLPurifier_HTMLModule_Hypertext(); $this->modules['List'] = new HTMLPurifier_HTMLModule_List(); + $this->modules['Presentation'] = new HTMLPurifier_HTMLModule_Presentation(); $this->attr_types = new HTMLPurifier_AttrTypes(); $this->attr_collection = new HTMLPurifier_AttrCollection();