3 header('Content-type: text/html; charset=UTF-8');
5 if (!isset($_GET['standalone'])) {
6 require_once '../library/HTMLPurifier.auto.php';
8 require_once '../library/HTMLPurifier.standalone.php';
10 error_reporting(E_ALL
);
12 function escapeHTML($string)
14 $string = HTMLPurifier_Encoder
::cleanUTF8($string);
15 $string = htmlspecialchars($string, ENT_COMPAT
, 'UTF-8');
19 if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
20 function fix_magic_quotes(&$array)
22 foreach ($array as $k => $val) {
23 if (!is_array($val)) {
24 $array[$k] = stripslashes($val);
26 fix_magic_quotes($array[$k]);
31 fix_magic_quotes($_GET);
32 fix_magic_quotes($_POST);
33 fix_magic_quotes($_COOKIE);
34 fix_magic_quotes($_REQUEST);
35 fix_magic_quotes($_ENV);
36 fix_magic_quotes($_SERVER);