ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Facade that coordinates HTML Purifier's subsystems in order to purify HTML. More...
Public Member Functions | |
__construct ($config=null) | |
Initializes the purifier. More... | |
addFilter ($filter) | |
Adds a filter to process the output. More... | |
purify ($html, $config=null) | |
Filters an HTML snippet/document to be XSS-free and standards-compliant. More... | |
purifyArray ($array_of_html, $config=null) | |
Filters an array of HTML snippets. More... | |
Static Public Member Functions | |
static | instance ($prototype=null) |
Singleton for enforcing just one HTML Purifier in your system. More... | |
static | getInstance ($prototype=null) |
Singleton for enforcing just one HTML Purifier in your system. More... | |
Data Fields | |
$version = '4.8.0' | |
Version of HTML Purifier. More... | |
const | VERSION = '4.8.0' |
Constant with version of HTML Purifier. More... | |
$config | |
Global configuration object. More... | |
$context | |
Resultant context of last run purification. More... | |
Protected Attributes | |
$strategy | |
HTMLPurifier_Strategy_Core More... | |
$generator | |
HTMLPurifier_Generator More... | |
Private Attributes | |
$filters = array() | |
Array of extra filter objects to run on HTML, for backwards compatibility. More... | |
Static Private Attributes | |
static | $instance |
Single instance of HTML Purifier. More... | |
Facade that coordinates HTML Purifier's subsystems in order to purify HTML.
Definition at line 54 of file HTMLPurifier.php.
HTMLPurifier::__construct | ( | $config = null | ) |
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. |
Definition at line 114 of file HTMLPurifier.php.
References $config, and HTMLPurifier_Config\create().
HTMLPurifier::addFilter | ( | $filter | ) |
Adds a filter to process the output.
First come first serve
HTMLPurifier_Filter | $filter | HTMLPurifier_Filter object |
Definition at line 125 of file HTMLPurifier.php.
|
static |
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. |
Definition at line 286 of file HTMLPurifier.php.
References instance().
Referenced by phorum_htmlpurifier_before_editor(), phorum_htmlpurifier_common(), phorum_htmlpurifier_editor_after_subject(), phorum_htmlpurifier_format(), phorum_htmlpurifier_quote(), and HTMLPurifier_ConfigSchema_Builder_Xml\writeHTMLDiv().
|
static |
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. |
Definition at line 261 of file HTMLPurifier.php.
References HTMLPurifier().
Referenced by getInstance().
HTMLPurifier::purify | ( | $html, | |
$config = null |
|||
) |
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. |
Definition at line 146 of file HTMLPurifier.php.
References $config, $context, $filters, $html, array, HTMLPurifier_IDAccumulator\build(), HTMLPurifier_Encoder\convertFromUTF8(), HTMLPurifier_Encoder\convertToUTF8(), HTMLPurifier_Lexer\create(), HTMLPurifier_Config\create(), and HTMLPurifier_LanguageFactory\instance().
Referenced by purifyArray().
HTMLPurifier::purifyArray | ( | $array_of_html, | |
$config = null |
|||
) |
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. |
Definition at line 240 of file HTMLPurifier.php.
References $config, $context, $html, array, and purify().
HTMLPurifier::$config |
Global configuration object.
Definition at line 72 of file HTMLPurifier.php.
Referenced by __construct(), purify(), and purifyArray().
HTMLPurifier::$context |
Resultant context of last run purification.
Is an array of contexts if the last called method was purifyArray(). HTMLPurifier_Context
Definition at line 102 of file HTMLPurifier.php.
Referenced by purify(), and purifyArray().
|
private |
Array of extra filter objects to run on HTML, for backwards compatibility.
Definition at line 79 of file HTMLPurifier.php.
Referenced by purify().
|
protected |
Definition at line 95 of file HTMLPurifier.php.
|
staticprivate |
|
protected |
Definition at line 90 of file HTMLPurifier.php.
HTMLPurifier::$version = '4.8.0' |
const HTMLPurifier::VERSION = '4.8.0' |
Constant with version of HTML Purifier.
Definition at line 66 of file HTMLPurifier.php.