Class HTMLPurifier_Generator
Generates HTML from tokens.
Methods summary
public
|
#
__construct( $config $config, $context $context )
Parameters
- $config
$config Instance of HTMLPurifier_Config
- $context
$context Instance of HTMLPurifier_Context
|
public
Generated
|
#
generateFromTokens( $tokens $tokens )
Generates HTML from an array of tokens.
Generates HTML from an array of tokens.
Parameters
- $tokens
$tokens Array of HTMLPurifier_Token
Returns
Generated HTML
|
public
Generated
|
#
generateFromToken( $token $token )
Generates HTML from a single token.
Generates HTML from a single token.
Parameters
- $token
$token HTMLPurifier_Token object.
Returns
Generated HTML
|
public
|
#
generateScriptFromToken( $token )
Special case processor for the contents of script tags
Special case processor for the contents of script tags
Warning
This runs into problems if there's already a literal --> somewhere inside the
script contents.
|
public
Generate
|
#
generateAttributes( $assoc_array_of_attributes $assoc_array_of_attributes, $element $element = false )
Generates attribute declarations from attribute array.
Generates attribute declarations from attribute array.
Parameters
- $assoc_array_of_attributes
$assoc_array_of_attributes Attribute array
- $element
$element Name of element attributes are for, used to check attribute minimization.
Returns
Generate HTML fragment for insertion.
Note
This does not include the leading or trailing space.
|
public
String
|
#
escape( $string $string, $quote $quote = null )
Escapes raw text data.
Parameters
- $string
$string String data to escape for HTML.
- $quote
$quote Quoting style, like htmlspecialchars. ENT_NOQUOTES is permissible for
non-attribute output.
Returns
String escaped data.
|
Properties summary
protected
|
$config
|
|
#
Configuration for the generator
Configuration for the generator
|