'&', ''' => "'", '<' => '<', '>' => '>', '"' => '"', ' ' => "\u{00A0}", ]; protected $ignoreErrors; protected $ignoreCharRefs; protected $ignoreNulls; protected $skipPreprocess; protected $scriptingFlag; protected $appropriateEndTag; protected $listener; protected $state; protected $preprocessed; protected $text; protected $pos; protected $length; protected $enableCdataCallback; protected $fragmentNamespace; protected $fragmentName; /** * Constructor * * @param TokenHandler $listener The object which receives token events * @param string $text The text to tokenize * @param array $options Associative array of options, including: * - ignoreErrors: True to improve performance by ignoring errors. The * token stream should still be the same, except that error() won't be * called. * - ignoreCharRefs: True to ignore character references. Character tokens * will contain the unexpanded character references, and no errors * related to invalid character references will be raised. Performance * will be improved. This is not compliant behaviour. * - ignoreNulls: True to ignore NULL bytes in the input stream, instead * of raising errors and converting them to U+FFFD as is usually * required by the spec. * - skipPreprocess: True to skip the "preprocessing the input stream" * stage, which normalizes line endings and raises errors on certain * control characters. Advisable if the input stream is already * appropriately normalized. * - scriptingFlag: True if the scripting flag is enabled. Default true. * Setting this to false cause the contents of