Class HTMLPurifier

Description

Facade that coordinates HTML Purifier's subsystems in order to purify HTML.

Facade that coordinates HTML Purifier's subsystems in order to purify HTML.

  • todo: We need an easier way to inject strategies using the configuration object.

Located in /library/HTMLPurifier.php (line 54)


	
			
Class Constant Summary
 VERSION = '3.1.1'
Variable Summary
mixed $config
mixed $context
mixed $generator
mixed $strategy
mixed $version
Method Summary
static void getInstance ([ $prototype = null])
static void instance ([$prototype $prototype = null])
HTMLPurifier __construct ([$config $config = null])
void addFilter ($filter $filter)
Purified purify ($html $html, [$config $config = null])
Array purifyArray ($config $array_of_html, [ $config = null])
Variables
mixed $config (line 64)

Global configuration object

Global configuration object

  • access: public
mixed $context (line 78)

Resultant HTMLPurifier_Context of last run purification. of contexts if the last called method was purifyArray().

Resultant HTMLPurifier_Context of last run purification. Is an array of contexts if the last called method was purifyArray().

  • access: public
mixed $generator (line 72)
  • access: protected
mixed $strategy (line 72)
  • access: protected
mixed $version = '3.1.1' (line 58)

Version of HTML Purifier

Version of HTML Purifier

  • access: public
Methods
static method getInstance (line 230)
  • access: public
static void getInstance ([ $prototype = null])
  • $prototype
static method instance (line 214)

Singleton for enforcing just one HTML Purifier in your system

Singleton for enforcing just one HTML Purifier in your system

  • access: public
static void instance ([$prototype $prototype = null])
  • $prototype $prototype: Optional prototype HTMLPurifier instance to overload singleton with, or HTMLPurifier_Config instance to configure the generated version with.
Constructor __construct (line 88)

Initializes the purifier.

Initializes the purifier.

  • access: public
HTMLPurifier __construct ([$config $config = null])
  • $config $config: Optional HTMLPurifier_Config object for all instances of the purifier, if omitted, a default configuration is supplied (which can be overridden on a per-use basis). The parameter can also be any type that HTMLPurifier_Config::create() supports.
addFilter (line 100)

Adds a filter to process the output.

Adds a filter to process the output. First come first serve

  • access: public
void addFilter ($filter $filter)
  • $filter $filter: HTMLPurifier_Filter object
purify (line 115)

Filters an HTML snippet/document to be XSS-free and standards-compliant.

Filters an HTML snippet/document to be XSS-free and standards-compliant.

  • return: HTML
  • access: public
Purified purify ($html $html, [$config $config = null])
  • $html $html: String of HTML to purify
  • $config $config: HTMLPurifier_Config object for this operation, if omitted, defaults to the config object specified during this object's construction. The parameter can also be any type that HTMLPurifier_Config::create() supports.
purifyArray (line 198)

Filters an array of HTML snippets

Filters an array of HTML snippets

  • return: of purified HTML
  • access: public
Array purifyArray ($config $array_of_html, [ $config = null])
  • $config $array_of_html: Optional HTMLPurifier_Config object for this operation. See HTMLPurifier::purify() for more details.
  • $config
Class Constants
VERSION = '3.1.1' (line 61)

Constant with version of HTML Purifier

Constant with version of HTML Purifier

Documentation generated on Thu, 19 Jun 2008 18:49:33 -0400 by phpDocumentor 1.4.2