1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-08 07:06:46 +02:00

Merged revisions for 1.3.1 release into branch, with local modifications to keep NEWS items in present.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/1.3@604 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-12-06 23:19:59 +00:00
parent d151ffd9e6
commit 3b979ee846
19 changed files with 149 additions and 72 deletions

View File

@@ -0,0 +1,21 @@
<?php
/**
* Function wrapper for HTML Purifier for quick use.
* @note This function only includes the library when it is called. While
* this is efficient for instances when you only use HTML Purifier
* on a few of your pages, it murders bytecode caching. You still
* need to add HTML Purifier to your path.
*/
function HTMLPurifier($html, $config = null) {
static $purifier = false;
if (!$purifier) {
$init = true;
require_once 'HTMLPurifier.php';
$purifier = new HTMLPurifier();
}
return $purifier->purify($html, $config);
}
?>