Cheetah
Public Member Functions | Protected Attributes | List of all members
HTMLPurifier_Generator Class Reference

Public Member Functions

 __construct ($config, $context)
 
 generateFromTokens ($tokens)
 
 generateFromToken ($token)
 
 generateScriptFromToken ($token)
 
 generateAttributes ($assoc_array_of_attributes, $element='')
 
 escape ($string, $quote=null)
 

Protected Attributes

 $config
 

Detailed Description

Generates HTML from tokens.

Definition at line 5178 of file HTMLPurifier.standalone.php.

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_Generator::__construct (   $config,
  $context 
)
Parameters
HTMLPurifier_Config$config
HTMLPurifier_Context$context

Definition at line 5235 of file HTMLPurifier.standalone.php.

Member Function Documentation

◆ escape()

HTMLPurifier_Generator::escape (   $string,
  $quote = null 
)

Escapes raw text data.

Parameters
string$stringString data to escape for HTML.
int$quoteQuoting style, like htmlspecialchars. ENT_NOQUOTES is permissible for non-attribute output.
Returns
string escaped data.

Definition at line 5443 of file HTMLPurifier.standalone.php.

◆ generateAttributes()

HTMLPurifier_Generator::generateAttributes (   $assoc_array_of_attributes,
  $element = '' 
)

Generates attribute declarations from attribute array.

Note
This does not include the leading or trailing space.
Parameters
array$assoc_array_of_attributesAttribute array
string$elementName of element attributes are for, used to check attribute minimization.
Returns
string Generated HTML fragment for insertion.

Definition at line 5379 of file HTMLPurifier.standalone.php.

◆ generateFromToken()

HTMLPurifier_Generator::generateFromToken (   $token)

Generates HTML from a single token.

Parameters
HTMLPurifier_Token$tokenHTMLPurifier_Token object.
Returns
string Generated HTML

Definition at line 5307 of file HTMLPurifier.standalone.php.

◆ generateFromTokens()

HTMLPurifier_Generator::generateFromTokens (   $tokens)

Generates HTML from an array of tokens.

Parameters
HTMLPurifier_Token[]$tokensArray of HTMLPurifier_Token
Returns
string Generated HTML

Definition at line 5251 of file HTMLPurifier.standalone.php.

◆ generateScriptFromToken()

HTMLPurifier_Generator::generateScriptFromToken (   $token)

Special case processor for the contents of script tags

Parameters
HTMLPurifier_Token$tokenHTMLPurifier_Token object.
Returns
string
Warning
This runs into problems if there's already a literal --> somewhere inside the script contents.

Definition at line 5361 of file HTMLPurifier.standalone.php.

Member Data Documentation

◆ $config

HTMLPurifier_Generator::$config
protected

Configuration for the generator @type HTMLPurifier_Config

Definition at line 5229 of file HTMLPurifier.standalone.php.


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