VERSION
VERSION = '4.13.0'
Constant with version of HTML Purifier.
Facade that coordinates HTML Purifier's subsystems in order to purify HTML.
__construct(\HTMLPurifier_Config|mixed $config = null) : mixed
Initializes the purifier.
\HTMLPurifier_Config|mixed | $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. |
purify(string $html, \HTMLPurifier_Config $config = null) : string
Filters an HTML snippet/document to be XSS-free and standards-compliant.
string | $html | String of HTML to purify |
\HTMLPurifier_Config | $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. |
Purified HTML
purifyArray(string[] $array_of_html, \HTMLPurifier_Config $config = null) : string[]
Filters an array of HTML snippets
string[] | $array_of_html | Array of html snippets |
\HTMLPurifier_Config | $config | Optional config object for this operation. See HTMLPurifier::purify() for more details. |
Array of purified HTML
instance(\HTMLPurifier|\HTMLPurifier_Config $prototype = null) : \HTMLPurifier
Singleton for enforcing just one HTML Purifier in your system
\HTMLPurifier|\HTMLPurifier_Config | $prototype | Optional prototype HTMLPurifier instance to overload singleton with, or HTMLPurifier_Config instance to configure the generated version with. |
getInstance(\HTMLPurifier|\HTMLPurifier_Config $prototype = null) : \HTMLPurifier
Singleton for enforcing just one HTML Purifier in your system
\HTMLPurifier|\HTMLPurifier_Config | $prototype | Optional prototype HTMLPurifier instance to overload singleton with, or HTMLPurifier_Config instance to configure the generated version with. |