extends |
HTMLPurifier_Strategy |
---|
Takes tokens makes them well-formed (balance end tags, etc.)
Specification of the armor attributes this strategy uses:
Methods | ||||||||
---|---|---|---|---|---|---|---|---|
public
|
execute(HTMLPurifier_Token[] $tokens, HTMLPurifier_Config $config, HTMLPurifier_Context $context): HTMLPurifier_Token[]
Executes the strategy on the tokens.
Executes the strategy on the tokens. Parameters
ReturnsProcessed array of token objects. Throws
Implements |
# | ||||||
protected
|
processToken(HTMLPurifier_Token|array|int|bool $token, HTMLPurifier_Injector|int $injector = -1)
Processes arbitrary token values for complicated substitution patterns.
In general:
Processes arbitrary token values for complicated substitution patterns. In general: If $token is an array, it is a list of tokens to substitute for the current token. These tokens then get individually processed. If there is a leading integer in the list, that integer determines how many tokens from the stream should be removed. If $token is a regular token, it is swapped with the current token. If $token is false, the current token is deleted. If $token is an integer, that number of tokens (with the first token being the current one) will be deleted. Parameters
Throws
|
# |
Properties | |||
---|---|---|---|
protected
|
|
$tokens
Array stream of tokens being processed.
Array stream of tokens being processed. |
# |
protected
|
|
$token
Current token.
Current token. |
# |
protected
|
|
$zipper
Zipper managing the true state.
Zipper managing the true state. |
# |
protected
|
|
$stack
Current nesting of elements.
Current nesting of elements. |
# |
protected
|
|
$injectors
Injectors active in this stream processing.
Injectors active in this stream processing. |
# |
protected
|
|
$config
Current instance of HTMLPurifier_Config.
Current instance of HTMLPurifier_Config. |
# |
protected
|
|
$context
Current instance of HTMLPurifier_Context.
Current instance of HTMLPurifier_Context. |
# |