static
void
getInstance
([ $prototype = null])
Singleton for enforcing just one HTML Purifier in your system
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.
Adds a filter to process the output. First come first serve
void
addFilter
($filter $filter)
-
$filter
$filter: HTMLPurifier_Filter object
Filters an HTML snippet/document to be XSS-free and standards-compliant.
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.
Filters an array of HTML snippets
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
Initializes the purifier.
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.