ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
HTMLPurifier.func.php File Reference

Defines a function wrapper for HTML Purifier for quick use. More...

Go to the source code of this file.

Functions

 HTMLPurifier ($html, $config=null)
 Purify HTML. More...
 

Detailed Description

Defines a function wrapper for HTML Purifier for quick use.

Note
''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()''

Definition in file HTMLPurifier.func.php.

Function Documentation

◆ HTMLPurifier()

HTMLPurifier (   $html,
  $config = null 
)

Purify HTML.

Parameters
string$htmlString HTML to purify
mixed$configConfiguration to use, can be any value accepted by HTMLPurifier_Config::create()
Returns
string

Definition at line 16 of file HTMLPurifier.func.php.

References $config, and $html.

Referenced by ilHtmlPurifierAbstractLibWrapper\__construct(), HTMLPurifier\instance(), kses(), and PhpOffice\PhpSpreadsheet\Writer\Html\writeComment().

17 {
18  static $purifier = false;
19  if (!$purifier) {
20  $purifier = new HTMLPurifier();
21  }
22  return $purifier->purify($html, $config);
23 }
$config
Definition: bootstrap.php:15
HTMLPurifier($html, $config=null)
Purify HTML.
$html
Definition: example_001.php:87
+ Here is the caller graph for this function: