mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-05 14:11:52 +00:00
[1.7.0] Minor reformatting of some modules to make them more like the XHTML abstract definitions
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1051 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
3b1c40b2fc
commit
8f6380d63a
@ -18,9 +18,9 @@ class HTMLPurifier_HTMLModule_Presentation extends HTMLPurifier_HTMLModule
|
|||||||
var $name = 'Presentation';
|
var $name = 'Presentation';
|
||||||
|
|
||||||
function HTMLPurifier_HTMLModule_Presentation() {
|
function HTMLPurifier_HTMLModule_Presentation() {
|
||||||
$this->addElement('hr', true, 'Block', 'Empty', 'Common');
|
|
||||||
$this->addElement('b', true, 'Inline', 'Inline', 'Common');
|
$this->addElement('b', true, 'Inline', 'Inline', 'Common');
|
||||||
$this->addElement('big', true, 'Inline', 'Inline', 'Common');
|
$this->addElement('big', true, 'Inline', 'Inline', 'Common');
|
||||||
|
$this->addElement('hr', true, 'Block', 'Empty', 'Common');
|
||||||
$this->addElement('i', true, 'Inline', 'Inline', 'Common');
|
$this->addElement('i', true, 'Inline', 'Inline', 'Common');
|
||||||
$this->addElement('small', true, 'Inline', 'Inline', 'Common');
|
$this->addElement('small', true, 'Inline', 'Inline', 'Common');
|
||||||
$this->addElement('sub', true, 'Inline', 'Inline', 'Common');
|
$this->addElement('sub', true, 'Inline', 'Inline', 'Common');
|
||||||
|
@ -13,6 +13,8 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
|
|||||||
|
|
||||||
function HTMLPurifier_HTMLModule_Tables() {
|
function HTMLPurifier_HTMLModule_Tables() {
|
||||||
|
|
||||||
|
$this->addElement('caption', true, false, 'Inline', 'Common');
|
||||||
|
|
||||||
$this->addElement('table', true, 'Block',
|
$this->addElement('table', true, 'Block',
|
||||||
new HTMLPurifier_ChildDef_Table(), 'Common',
|
new HTMLPurifier_ChildDef_Table(), 'Common',
|
||||||
array(
|
array(
|
||||||
@ -31,17 +33,15 @@ class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->addElement('caption', true, false, 'Inline', 'Common');
|
|
||||||
|
|
||||||
// common attributes
|
// common attributes
|
||||||
$cell_align = array(
|
$cell_align = array(
|
||||||
'align' => new HTMLPurifier_AttrDef_Enum(array(
|
'align' => new HTMLPurifier_AttrDef_Enum(array(
|
||||||
'left', 'center', 'right', 'justify', 'char'
|
'left', 'center', 'right', 'justify', 'char'
|
||||||
), false),
|
), false),
|
||||||
|
'charoff' => 'Length',
|
||||||
'valign' => new HTMLPurifier_AttrDef_Enum(array(
|
'valign' => new HTMLPurifier_AttrDef_Enum(array(
|
||||||
'top', 'middle', 'bottom', 'baseline'
|
'top', 'middle', 'bottom', 'baseline'
|
||||||
), false),
|
), false),
|
||||||
'charoff' => 'Length',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$cell_t = array_merge(
|
$cell_t = array_merge(
|
||||||
|
@ -42,9 +42,8 @@ class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule
|
|||||||
$this->addElement('br', true, 'Inline', 'Empty', 'Core');
|
$this->addElement('br', true, 'Inline', 'Empty', 'Core');
|
||||||
|
|
||||||
// Block Phrasal --------------------------------------------------
|
// Block Phrasal --------------------------------------------------
|
||||||
$this->addElement('address', true, 'Block', 'Inline', 'Common');
|
$this->addElement('address', true, 'Block', 'Inline', 'Common');
|
||||||
$this->addElement('blockquote', true, 'Block',
|
$this->addElement('blockquote', true, 'Block', 'Optional: Heading | Block | List', 'Common', array('cite' => 'URI') );
|
||||||
'Optional: Heading | Block | List', 'Common', array('cite' => 'URI') );
|
|
||||||
$pre =& $this->addElement('pre', true, 'Block', 'Inline', 'Common');
|
$pre =& $this->addElement('pre', true, 'Block', 'Inline', 'Common');
|
||||||
$pre->excludes = $this->makeLookup(
|
$pre->excludes = $this->makeLookup(
|
||||||
'img', 'big', 'small', 'object', 'applet', 'font', 'basefont' );
|
'img', 'big', 'small', 'object', 'applet', 'font', 'basefont' );
|
||||||
@ -63,7 +62,7 @@ class HTMLPurifier_HTMLModule_Text extends HTMLPurifier_HTMLModule
|
|||||||
'address', 'blockquote', 'dd', 'dir', 'div', 'dl', 'dt',
|
'address', 'blockquote', 'dd', 'dir', 'div', 'dl', 'dt',
|
||||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'ol', 'p', 'pre',
|
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'ol', 'p', 'pre',
|
||||||
'table', 'ul' );
|
'table', 'ul' );
|
||||||
$this->addElement('div', true, 'Block', 'Flow', 'Common');
|
$this->addElement('div', true, 'Block', 'Flow', 'Common');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user