public static function removeXSS($str) {
$str = str_replace('{C}', '', $str);
$str = preg_replace('~/\*[ ]+\*/~i', '', $str);
$str = preg_replace('/\\\0{0,4}4[0-9a-f]/is', '', $str);
$str = preg_replace('/\\\0{0,4}5[0-9a]/is', '', $str);
$str = preg_replace('/\\\0{0,4}6[0-9a-f]/is', '', $str);
$str = preg_replace('/\\\0{0,4}7[0-9a]/is', '', $str);
$str = preg_replace('/?{0,8}[0-9a-f]{2};/is', '', $str);
$str = preg_replace('/?{0,8}[0-9]{2,3};/is', '', $str);
$str = preg_replace('/?{0,8}[0-9]{2,3};/is', '', $str);
$str = htmlspecialchars($str);