1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-02 02:57:26 +01:00
vichan/inc/lib/htmlpurifier-4.5.0/library/HTMLPurifier.func.php
2014-09-23 23:25:04 +00:00

24 lines
568 B
PHP

<?php
/**
* @file
* Defines a function wrapper for HTML Purifier for quick use.
* @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()''
*/
/**
* Purify HTML.
* @param $html String HTML to purify
* @param $config Configuration to use, can be any value accepted by
* HTMLPurifier_Config::create()
*/
function HTMLPurifier($html, $config = null) {
static $purifier = false;
if (!$purifier) {
$purifier = new HTMLPurifier();
}
return $purifier->purify($html, $config);
}
// vim: et sw=4 sts=4