HTMLPurifier_Node_Text
Concrete text token class.
Text tokens comprise of regular parsed character data (PCDATA) and raw character data (from the CDATA sections). Internally, their data is parsed with all entities expanded. Surprisingly, the text token does have a "tag name" called #PCDATA, which is how the DTD represents it in permissible child nodes.
- Full name:
\HTMLPurifier_Node_Text
- Parent class:
\HTMLPurifier_Node
Properties
name
PCDATA tag name compatible with DTD, see HTMLPurifier_ChildDef_Custom for details.
data
is_whitespace
Methods
__construct
Constructor, accepts data and determines if it is whitespace.
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string | String parsed character data. |
$is_whitespace |
mixed | |
$line |
int | |
$col |
int |
toTokenPair
Returns a pair of start and end tokens, where the end token is null if it is not necessary. Does not include children.
Inherited methods
toTokenPair
Returns a pair of start and end tokens, where the end token is null if it is not necessary. Does not include children.
- This method is abstract.
Automatically generated on 2025-03-18