4require_once
'libs/composer/vendor/autoload.php';
5require_once
'Services/Html/interfaces/interface.ilHtmlPurifierInterface.php';
50 final public function purify($a_html, $a_config =
null)
52 return $this->oPurifier->purify($a_html, $a_config);
64 final public function purifyArray(array $a_array_of_html, $a_config =
null)
66 return $this->oPurifier->purifyArray($a_array_of_html, $a_config);
138 $supportedElements = array();
140 $notSupportedTags = array(
153 foreach ($a_array as $element) {
154 if (!in_array($element, $notSupportedTags)) {
155 $supportedElements[] = $element;
159 return $supportedElements;
167 if (in_array(
'u', $elements) && !in_array(
'span', $elements)) {
168 $elements[] =
'span';
HTMLPurifier($html, $config=null)
Purify HTML.
An exception for terminatinating execution or to throw for unit testing.
Facade that coordinates HTML Purifier's subsystems in order to purify HTML.
Abstract class wrapping the HTMLPurifier instance.
makeElementListTinyMceCompliant($elements)
removeUnsupportedElements($a_array)
Removes all unsupported elements.
purifyArray(array $a_array_of_html, $a_config=null)
Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.
setPurifier(HTMLPurifier $oPurifier)
Set the purifier by subclass.
getPurifierConfigInstance()
Has to be implemented by subclasses to build the HTMLPurifier_Config instance with object specific co...
getPurifier()
Get the purifier.
purify($a_html, $a_config=null)
Filters an HTML snippet/document to be XSS-free and standards-compliant.
__construct()
Constructor.
static _getCacheDirectory()
Get the directory for HTMLPurifier cache files.
static getDataDir()
get data directory (outside webspace)
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Interface for html sanitizing functionality.