\HTMLPurifier_ChildDef_Custom
Custom validation class, accepts DTD child definitions
Synopsis
class HTMLPurifier_ChildDef_Custom
extends HTMLPurifier_ChildDef
{
- // members
- public string $type = 'custom';
- public boolean $allow_empty = false;
- public $dtd_regex;
- private $_pcre_regex;
- // Inherited members from HTMLPurifier_ChildDef
- public $type;
- public $allow_empty;
- public array $elements;
- // methods
- public void __construct()
- protected void _compileRegex()
- public void validateChildren()
- // Inherited methods from HTMLPurifier_ChildDef
- public void getAllowedElements()
- public abstract bool validateChildren()
Hierarchy
Extends
Members
private
-
$_pcre_regex
PCRE regex derived from $dtd_regex
public
- $allow_empty
-
$allow_empty
Bool that indicates whether or not an empty array of children is okay -
$dtd_regex
Allowed child pattern as defined by the DTD -
$elements
Lookup array of all elements that this definition could possibly allow - $type
-
$type
Type of child definition, usually right-most part of class name lowercase.
Methods
protected
- _compileRegex() — Compiles the PCRE regex from a DTD regex ($dtd_regex to $_pcre_regex)
public
Inherited from HTMLPurifier_ChildDef
public
- getAllowedElements() — Get lookup of tag names that should not close this element automatically.
- validateChildren() — Validates nodes according to definition and returns modification.