HumHub Documentation (unofficial)

HTMLPurifier_Node_Text extends HTMLPurifier_Node
in package

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.

Table of Contents

Properties

$armor  : mixed
Lookup array of processing that this token is exempt from.
$col  : mixed
Column number of the start token in the source document. Null if unknown.
$data  : mixed
$dead  : mixed
When true, this node should be ignored as non-existent.
$is_whitespace  : mixed
$line  : mixed
Line number of the start token in the source document
$name  : mixed
PCDATA tag name compatible with DTD, see HTMLPurifier_ChildDef_Custom for details.

Methods

__construct()  : mixed
Constructor, accepts data and determines if it is whitespace.
toTokenPair()  : mixed
Returns a pair of start and end tokens, where the end token is null if it is not necessary. Does not include children.

Properties

$armor

Lookup array of processing that this token is exempt from.

public mixed $armor = array()

Currently, valid values are "ValidateAttributes".

Tags
type

array

$col

Column number of the start token in the source document. Null if unknown.

public mixed $col
Tags
type

int

$data

public mixed $data
Tags
type

string

$dead

When true, this node should be ignored as non-existent.

public mixed $dead = \false

Who is responsible for ignoring dead nodes? FixNesting is responsible for removing them before passing on to child validators.

$is_whitespace

public mixed $is_whitespace
Tags
type

bool

$line

Line number of the start token in the source document

public mixed $line
Tags
type

int

$name

PCDATA tag name compatible with DTD, see HTMLPurifier_ChildDef_Custom for details.

public mixed $name = '#PCDATA'
Tags
type

string

Methods

__construct()

Constructor, accepts data and determines if it is whitespace.

public __construct(string $data, mixed $is_whitespace[, int $line = null ][, int $col = null ]) : mixed
Parameters
$data : string

String parsed character data.

$is_whitespace : mixed
$line : int = null
$col : int = null

toTokenPair()

Returns a pair of start and end tokens, where the end token is null if it is not necessary. Does not include children.

public toTokenPair() : mixed

        
On this page

Search results