4 require_once
'libs/composer/vendor/autoload.php';
5 require_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);
139 $supportedElements =
array();
141 $notSupportedTags =
array(
154 foreach($a_array as $element)
156 if(!in_array($element, $notSupportedTags))
158 $supportedElements[] = $element;
162 return $supportedElements;
170 if( in_array(
'u', $elements) && !in_array(
'span', $elements) )
172 $elements[] =
'span';
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static _getCacheDirectory()
Get the directory for HTMLPurifier cache files.
removeUnsupportedElements($a_array)
Removes all unsupported elements.
getPurifier()
Get the purifier.
getPurifierConfigInstance()
Has to be implemented by subclasses to build the HTMLPurifier_Config instance with object specific co...
Facade that coordinates HTML Purifier's subsystems in order to purify HTML.
purify($a_html, $a_config=null)
Filters an HTML snippet/document to be XSS-free and standards-compliant.
Abstract class wrapping the HTMLPurifier instance.
__construct()
Constructor.
setPurifier(HTMLPurifier $oPurifier)
Set the purifier by subclass.
Interface for html sanitizing functionality.
purifyArray(Array $a_array_of_html, $a_config=null)
Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.
Create styles array
The data for the language used.
static getDataDir()
get data directory (outside webspace)
makeElementListTinyMceCompliant($elements)
HTMLPurifier($html, $config=null)
Purify HTML.