Class HTMLPurifier

Description

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 /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 74)


	
			
Class Constant Summary
 VERSION = '4.2.0'
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])
void addFilter ($filter $filter)
Purified purify ($html $html, [$config $config = null])
Array purifyArray ($config $array_of_html, [ $config = null])
HTMLPurifier __construct ([$config $config = null])
Variables
mixed $config (line 84)

Global configuration object

  • access: public
mixed $context (line 98)

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

  • access: public
mixed $generator (line 92)
  • access: protected
mixed $strategy (line 92)
  • access: protected
mixed $version = '4.2.0' (line 78)

Version of HTML Purifier

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

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.
addFilter (line 120)

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

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

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 219)

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
Constructor __construct (line 108)

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.
Class Constants
VERSION = '4.2.0' (line 81)

Constant with version of HTML Purifier

Documentation generated on Sun, 06 Mar 2011 00:23:58 -0500 by phpDocumentor 1.4.3