ILIAS
Release_5_0_x_branch Revision 61816
|
Takes tokens makes them well-formed (balance end tags, etc.) More...
Public Member Functions | |
execute ($tokens, $config, $context) |
Protected Member Functions | |
processToken ($token, $injector=-1) | |
Processes arbitrary token values for complicated substitution patterns. |
Protected Attributes | |
$tokens | |
Array stream of tokens being processed. | |
$token | |
Current token. | |
$zipper | |
Zipper managing the true state. | |
$stack | |
Current nesting of elements. | |
$injectors | |
Injectors active in this stream processing. | |
$config | |
Current instance of HTMLPurifier_Config. | |
$context | |
Current instance of HTMLPurifier_Context. |
Private Member Functions | |
insertBefore ($token) | |
Inserts a token before the current token. | |
remove () | |
Removes current token. |
Takes tokens makes them well-formed (balance end tags, etc.)
Specification of the armor attributes this strategy uses:
- MakeWellFormed_TagClosedError: This armor field is used to suppress tag closed errors for certain tokens [TagClosedSuppress], in particular, if a tag was generated automatically by HTML Purifier, we may rely on our infrastructure to close it for us and shouldn't report an error to the user [TagClosedAuto].
Definition at line 14 of file MakeWellFormed.php.
HTMLPurifier_Strategy_MakeWellFormed::execute | ( | $tokens, | |
$config, | |||
$context | |||
) |
HTMLPurifier_Token[] | $tokens | |
HTMLPurifier_Config | $config | |
HTMLPurifier_Context | $context |
HTMLPurifier_Exception |
Reimplemented from HTMLPurifier_Strategy.
Definition at line 66 of file MakeWellFormed.php.
References $config, $context, $injectors, $ok, $size, $stack, $token, $tokens, $zipper, HTMLPurifier_Zipper\fromArray(), insertBefore(), and processToken().
|
private |
Inserts a token before the current token.
Cursor now points to this token. You must reprocess after this.
HTMLPurifier_Token | $token |
Definition at line 581 of file MakeWellFormed.php.
References $token.
Referenced by execute().
|
protected |
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.
HTMLPurifier_Token | array | int | bool | $token | Token substitution value |
HTMLPurifier_Injector | int | $injector | Injector that performed the substitution; default is if this is not an injector related operation. |
HTMLPurifier_Exception |
Definition at line 535 of file MakeWellFormed.php.
References $token.
Referenced by execute().
|
private |
Removes current token.
Cursor now points to new token occupying previously occupied space. You must reprocess after this.
Definition at line 594 of file MakeWellFormed.php.
|
protected |
Current instance of HTMLPurifier_Config.
Definition at line 51 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current instance of HTMLPurifier_Context.
Definition at line 57 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Injectors active in this stream processing.
Definition at line 45 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current nesting of elements.
array
Definition at line 39 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current token.
Definition at line 27 of file MakeWellFormed.php.
Referenced by execute(), insertBefore(), and processToken().
|
protected |
Array stream of tokens being processed.
Definition at line 21 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Zipper managing the true state.
Definition at line 33 of file MakeWellFormed.php.
Referenced by execute().