mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-08 14:58:42 +00:00
e99520ab96
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1253 48356398-32a2-884e-a903-53898d9a118a
14 lines
304 B
PHP
14 lines
304 B
PHP
<?php
|
|
|
|
header('Content-type: text/html; charset=UTF-8');
|
|
|
|
require_once '../library/HTMLPurifier.auto.php';
|
|
error_reporting(E_ALL);
|
|
|
|
function escapeHTML($string) {
|
|
$string = HTMLPurifier_Encoder::cleanUTF8($string);
|
|
$string = htmlspecialchars($string, ENT_COMPAT, 'UTF-8');
|
|
return $string;
|
|
}
|
|
|