PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / library / HTMLPurifier.func.php
blob64b140bec2199f30edb2e1370063650e66bf5bd6
1 <?php
3 /**
4 * @file
5 * Defines a function wrapper for HTML Purifier for quick use.
6 * @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()''
7 */
9 /**
10 * Purify HTML.
11 * @param string $html String HTML to purify
12 * @param mixed $config Configuration to use, can be any value accepted by
13 * HTMLPurifier_Config::create()
14 * @return string
16 function HTMLPurifier($html, $config = null)
18 static $purifier = false;
19 if (!$purifier) {
20 $purifier = new HTMLPurifier();
22 return $purifier->purify($html, $config);
25 // vim: et sw=4 sts=4