一个过虑xxs的代码 public static function removeXSS($str) { $str = str_replace('<!-- -->', '', $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', '', $s…