Property | Type | Description | |
---|---|---|---|
$config | Global configuration object. | ||
$context | Is an array of contexts if the last called method was purifyArray(). | ||
$version | Version of HTML Purifier. |
Property | Type | Description | |
---|---|---|---|
$generator | |||
$strategy |
Method | Description | |
---|---|---|
__construct ( HTMLPurifier_Config | mixed $config = null ) | Initializes the purifier. | |
addFilter ( HTMLPurifier_Filter $filter ) | Adds a filter to process the output. First come first serve | |
getInstance ( HTMLPurifier | HTMLPurifier_Config $prototype = null ) : HTMLPurifier | Singleton for enforcing just one HTML Purifier in your system | |
instance ( HTMLPurifier | HTMLPurifier_Config $prototype = null ) : HTMLPurifier | Singleton for enforcing just one HTML Purifier in your system | |
purify ( string $html, HTMLPurifier_Config $config = null ) : string | Filters an HTML snippet/document to be XSS-free and standards-compliant. | |
purifyArray ( string[] $array_of_html, HTMLPurifier_Config $config = null ) : string[] | Filters an array of HTML snippets |
public __construct ( HTMLPurifier_Config | mixed $config = null ) | ||
$config | HTMLPurifier_Config | mixed | 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. |
public addFilter ( HTMLPurifier_Filter $filter ) | ||
$filter | HTMLPurifier_Filter | HTMLPurifier_Filter object |
public static getInstance ( HTMLPurifier | HTMLPurifier_Config $prototype = null ) : HTMLPurifier | ||
$prototype | HTMLPurifier | HTMLPurifier_Config | Optional prototype HTMLPurifier instance to overload singleton with, or HTMLPurifier_Config instance to configure the generated version with. |
return | HTMLPurifier |
public static instance ( HTMLPurifier | HTMLPurifier_Config $prototype = null ) : HTMLPurifier | ||
$prototype | HTMLPurifier | HTMLPurifier_Config | Optional prototype HTMLPurifier instance to overload singleton with, or HTMLPurifier_Config instance to configure the generated version with. |
return | HTMLPurifier |
public purify ( string $html, HTMLPurifier_Config $config = null ) : string | ||
$html | string | String of HTML to purify |
$config | HTMLPurifier_Config | 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. |
return | string | Purified HTML |
public purifyArray ( string[] $array_of_html, HTMLPurifier_Config $config = null ) : string[] | ||
$array_of_html | string[] | Array of html snippets |
$config | HTMLPurifier_Config | Optional config object for this operation. See HTMLPurifier::purify() for more details. |
return | string[] | Array of purified HTML |
public $context |