$tracksLineNumbers
$tracksLineNumbers
Whether or not this lexer implements line-number/column-number tracking.
Our in-house implementation of a parser.
A pure PHP parser, DirectLex has absolutely no dependencies, making it a reasonably good default for PHP4. Written with efficiency in mind, it can be four times faster than HTMLPurifier_Lexer_PEARSax3, although it pales in comparison to HTMLPurifier_Lexer_DOMLex.
create(\HTMLPurifier_Config $config) : \HTMLPurifier_Lexer
Retrieves or sets the default Lexer as a Prototype Factory.
By default HTMLPurifier_Lexer_DOMLex will be returned. There are a few exceptions involving special features that only DirectLex implements.
\HTMLPurifier_Config | $config |
parseData(string $string, mixed $is_attr, mixed $config) : string
Parses special entities into the proper characters.
This string will translate escaped versions of the special characters into the correct ones.
string | $string | String character data to be parsed. |
mixed | $is_attr | |
mixed | $config |
Parsed character data.
normalize(string $html, \HTMLPurifier_Config $config, \HTMLPurifier_Context $context) : string
Takes a piece of HTML and normalizes it by converting entities, fixing encoding, extracting bits, and other good stuff.
string | $html | HTML. |
\HTMLPurifier_Config | $config | |
\HTMLPurifier_Context | $context |
parseAttributeString(string $string, \HTMLPurifier_Config $config, \HTMLPurifier_Context $context) : array
Takes the inside of an HTML tag and makes an assoc array of attributes.
string | $string | Inside of tag excluding name. |
\HTMLPurifier_Config | $config | |
\HTMLPurifier_Context | $context |
Assoc array of attributes.