HTMLPurifier 4.4.0
|
Defines allowed child nodes and validates tokens against it. More...
Public Member Functions | |
getAllowedElements ($config) | |
Get lookup of tag names that should not close this element automatically. | |
validateChildren ($tokens_of_children, $config, $context) | |
Validates nodes according to definition and returns modification. | |
getAllowedElements ($config) | |
Get lookup of tag names that should not close this element automatically. | |
validateChildren ($tokens_of_children, $config, $context) | |
Validates nodes according to definition and returns modification. | |
Public Attributes | |
$type | |
Type of child definition, usually right-most part of class name lowercase. | |
$allow_empty | |
Bool that indicates whether or not an empty array of children is okay. | |
$elements = array() | |
Lookup array of all elements that this definition could possibly allow. |
Defines allowed child nodes and validates tokens against it.
Definition at line 6 of file ChildDef.php.
HTMLPurifier_ChildDef::getAllowedElements | ( | $ | config | ) |
Get lookup of tag names that should not close this element automatically.
All other elements will do so.
Reimplemented in HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_StrictBlockquote.
Definition at line 31 of file ChildDef.php.
HTMLPurifier_ChildDef::getAllowedElements | ( | $ | config | ) |
Get lookup of tag names that should not close this element automatically.
All other elements will do so.
Reimplemented in HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_StrictBlockquote.
Definition at line 1334 of file HTMLPurifier.standalone.php.
HTMLPurifier_ChildDef::validateChildren | ( | $ | tokens_of_children, |
$ | config, | ||
$ | context | ||
) | [abstract] |
Validates nodes according to definition and returns modification.
$tokens_of_children | Array of HTMLPurifier_Token |
$config | HTMLPurifier_Config object |
$context | HTMLPurifier_Context object |
Reimplemented in HTMLPurifier_ChildDef_Chameleon, HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_StrictBlockquote, HTMLPurifier_ChildDef_Table, HTMLPurifier_ChildDef_Chameleon, HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_Table.
HTMLPurifier_ChildDef::validateChildren | ( | $ | tokens_of_children, |
$ | config, | ||
$ | context | ||
) | [abstract] |
Validates nodes according to definition and returns modification.
$tokens_of_children | Array of HTMLPurifier_Token |
$config | HTMLPurifier_Config object |
$context | HTMLPurifier_Context object |
Reimplemented in HTMLPurifier_ChildDef_Chameleon, HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_StrictBlockquote, HTMLPurifier_ChildDef_Table, HTMLPurifier_ChildDef_Chameleon, HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_Table.
HTMLPurifier_ChildDef::$allow_empty |
Bool that indicates whether or not an empty array of children is okay.
This is necessary for redundant checking when changes affecting a child node may cause a parent node to now be disallowed.
Reimplemented in HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_Table.
Definition at line 20 of file ChildDef.php.
HTMLPurifier_ChildDef::$elements = array() |
Lookup array of all elements that this definition could possibly allow.
Reimplemented in HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Required, and HTMLPurifier_ChildDef_Table.
Definition at line 25 of file ChildDef.php.
HTMLPurifier_ChildDef::$type |
Type of child definition, usually right-most part of class name lowercase.
Used occasionally in terms of context.
Reimplemented in HTMLPurifier_ChildDef_Chameleon, HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_Table.
Definition at line 12 of file ChildDef.php.