ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.

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 (   $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.

Referenced by ilHtmlPurifierAbstractLibWrapper\__construct(), HTMLPurifier\instance(), and kses().

{
static $purifier = false;
if (!$purifier) {
$purifier = new HTMLPurifier();
}
return $purifier->purify($html, $config);
}

+ Here is the caller graph for this function: