]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - inc/3rdparty/htmlpurifier/HTMLPurifier/Node/Text.php
4 * Concrete text token class.
6 * Text tokens comprise of regular parsed character data (PCDATA) and raw
7 * character data (from the CDATA sections). Internally, their
8 * data is parsed with all entities expanded. Surprisingly, the text token
9 * does have a "tag name" called #PCDATA, which is how the DTD represents it
10 * in permissible child nodes.
12 class HTMLPurifier_Node_Text
extends HTMLPurifier_Node
16 * PCDATA tag name compatible with DTD, see
17 * HTMLPurifier_ChildDef_Custom for details.
20 public $name = '#PCDATA';
26 /**< Parsed character data of text. */
31 public $is_whitespace;
33 /**< Bool indicating if node is whitespace. */
36 * Constructor, accepts data and determines if it is whitespace.
37 * @param string $data String parsed character data.
41 public function __construct($data, $is_whitespace, $line = null, $col = null)
44 $this->is_whitespace
= $is_whitespace;
49 public function toTokenPair() {
50 return array(new HTMLPurifier_Token_Text($this->data
, $this->line
, $this->col
), null);