|
ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Takes tokens makes them well-formed (balance end tags, etc.) More...
Inheritance diagram for HTMLPurifier_Strategy_MakeWellFormed:
Collaboration diagram for HTMLPurifier_Strategy_MakeWellFormed:Public Member Functions | |
| execute ($tokens, $config, $context) | |
| execute ($tokens, $config, $context) | |
| Executes the strategy on the tokens. More... | |
Protected Member Functions | |
| processToken ($token, $injector=-1) | |
| Processes arbitrary token values for complicated substitution patterns. More... | |
Protected Attributes | |
| $tokens | |
| Array stream of tokens being processed. More... | |
| $token | |
| Current token. More... | |
| $zipper | |
| Zipper managing the true state. More... | |
| $stack | |
| Current nesting of elements. More... | |
| $injectors | |
| Injectors active in this stream processing. More... | |
| $config | |
| Current instance of HTMLPurifier_Config. More... | |
| $context | |
| Current instance of HTMLPurifier_Context. More... | |
Private Member Functions | |
| insertBefore ($token) | |
| Inserts a token before the current token. More... | |
| remove () | |
| Removes current token. More... | |
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, $error, $injectors, $ok, $r, $size, $stack, $token, $tokens, $zipper, HTMLPurifier_Zipper\fromArray(), insertBefore(), and processToken().
Here is the call graph for this function:
|
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().
Here is the caller graph for this function:
|
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 $old, $r, and $token.
Referenced by execute().
Here is the caller graph for this function:
|
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.
@type HTMLPurifier_Config
Definition at line 51 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current instance of HTMLPurifier_Context.
@type HTMLPurifier_Context
Definition at line 57 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Injectors active in this stream processing.
@type HTMLPurifier_Injector[]
Definition at line 45 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current nesting of elements.
@type array
Definition at line 39 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current token.
@type HTMLPurifier_Token
Definition at line 27 of file MakeWellFormed.php.
Referenced by execute(), insertBefore(), and processToken().
|
protected |
Array stream of tokens being processed.
@type HTMLPurifier_Token[]
Definition at line 21 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Zipper managing the true state.
@type HTMLPurifier_Zipper
Definition at line 33 of file MakeWellFormed.php.
Referenced by execute().