API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_Strategy_MakeWellFormed Class Reference
Inheritance diagram for HTMLPurifier_Strategy_MakeWellFormed:
Collaboration diagram for HTMLPurifier_Strategy_MakeWellFormed:

Public Member Functions

 execute ($tokens, $config, $context)
 
 execute ($tokens, $config, $context)
 

Protected Member Functions

 processToken ($token, $injector=-1)
 

Protected Attributes

 $tokens
 
 $token
 
 $zipper
 
 $stack
 
 $injectors
 
 $config
 
 $context
 

Detailed Description

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].

Member Function Documentation

◆ execute()

execute (   $tokens,
  $config,
  $context 
)
Parameters
HTMLPurifier_Token[]$tokens
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
HTMLPurifier_Token[]
Exceptions
HTMLPurifier_Exception

Reimplemented from HTMLPurifier_Strategy.

Here is the call graph for this function:

◆ processToken()

processToken (   $token,
  $injector = -1 
)
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.

Parameters
HTMLPurifier_Token | array | int | bool$tokenToken substitution value
HTMLPurifier_Injector | int$injectorInjector that performed the substitution; default is if this is not an injector related operation.
Exceptions
HTMLPurifier_Exception
Here is the caller graph for this function:

Field Documentation

◆ $config

$config
protected

Current instance of HTMLPurifier_Config. @type HTMLPurifier_Config

◆ $context

$context
protected

Current instance of HTMLPurifier_Context. @type HTMLPurifier_Context

◆ $injectors

$injectors
protected

Injectors active in this stream processing. @type HTMLPurifier_Injector[]

◆ $stack

$stack
protected

Current nesting of elements. @type array

◆ $token

$token
protected

Current token. @type HTMLPurifier_Token

◆ $tokens

$tokens
protected

Array stream of tokens being processed. @type HTMLPurifier_Token[]

◆ $zipper

$zipper
protected

Zipper managing the true state. @type HTMLPurifier_Zipper


The documentation for this class was generated from the following file: