extends |
HTMLPurifier_Lexer |
---|
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.
Methods | ||||
---|---|---|---|---|
protected
|
scriptCallback(array $matches): string
Callback function for script CDATA fudge
Callback function for script CDATA fudge Parameters
|
# | ||
public
|
tokenizeHTML(String $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context): array|HTMLPurifier_Token[]
Lexes an HTML string into tokens.
Lexes an HTML string into tokens. Returnsarray representation of HTML. Overrides |
# | ||
protected
|
substrCount(string $haystack, string $needle, int $offset, int $length): int
PHP 5.0.x compatible substr_count that implements offset and length
PHP 5.0.x compatible substr_count that implements offset and length |
# | ||
public
|
parseAttributeString(string $string, HTMLPurifier_Config $config, HTMLPurifier_Context $context): array
Takes the inside of an HTML tag and makes an assoc array of attributes.
Takes the inside of an HTML tag and makes an assoc array of attributes. Parameters
ReturnsAssoc array of attributes. |
# |
Methods inherited from HTMLPurifier_Lexer |
---|
create(), __construct(), parseText(), parseAttr(), parseData(), escapeCDATA(), escapeCommentedCDATA(), removeIEConditional(), CDATACallback(), normalize(), extractBody() |
Properties | |||
---|---|---|---|
public
|
|
$tracksLineNumbers = true
|
# |
protected
|
|
$_whitespace = "\x20\x09\x0D\x0A"
Whitespace characters for str(c)spn.
Whitespace characters for str(c)spn. |
# |
Properties inherited from HTMLPurifier_Lexer |
---|
$_special_entity2str |