Remove useless $init assignment.
[htmlpurifier.git] / library / HTMLPurifier.func.php
blobc9a81eb17f8cf5140771f4b173a87d347eb6eba5
1 <?php
3 /**
4 * Function wrapper for HTML Purifier for quick use.
5 * @note This function only includes the library when it is called. While
6 * this is efficient for instances when you only use HTML Purifier
7 * on a few of your pages, it murders bytecode caching. You still
8 * need to add HTML Purifier to your path.
9 */
11 function HTMLPurifier($html, $config = null) {
12 static $purifier = false;
13 if (!$purifier) {
14 require_once 'HTMLPurifier.php';
15 $purifier = new HTMLPurifier();
17 return $purifier->purify($html, $config);