Class HTMLPurifier_Strategy_MakeWellFormed

Description

Takes tokens makes them well-formed (balance end tags, etc.)

Located in /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 14622)

HTMLPurifier_Strategy
   |
   --HTMLPurifier_Strategy_MakeWellFormed
Variable Summary
mixed $config
mixed $context
mixed $injectors
mixed $stack
mixed $t
mixed $tokens
Method Summary
void execute ( $tokens,  $config,  $context)
void processToken ($token $token, [$injector $injector = -1])
Variables
mixed $config (line 14648)

Current instance of HTMLPurifier_Config.

  • access: protected
mixed $context (line 14653)

Current instance of HTMLPurifier_Context.

  • access: protected
mixed $injectors (line 14643)

Injectors active in this stream processing.

  • access: protected
mixed $stack (line 14638)

Current nesting of elements.

  • access: protected
mixed $t (line 14633)

Current index in $tokens.

  • access: protected
mixed $tokens (line 14628)

Array stream of tokens being processed.

  • access: protected
Methods
execute (line 14655)
  • access: public
void execute ( $tokens,  $config,  $context)
  • $tokens
  • $config
  • $context

Redefinition of:
HTMLPurifier_Strategy::execute()
Executes the strategy on the tokens.
processToken (line 15040)

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.

  • access: protected
void processToken ($token $token, [$injector $injector = -1])
  • $token $token: Token substitution value
  • $injector $injector: Injector that performed the substitution; default is if this is not an injector related operation.

Inherited Methods

Inherited From HTMLPurifier_Strategy

HTMLPurifier_Strategy::execute()

Documentation generated on Sun, 06 Mar 2011 00:24:10 -0500 by phpDocumentor 1.4.3