PHP Filtering HTML PHP Filter HTML code Filter HTML ASP filter the HTML filter the Code filter HTML tag ASP filter HTML code
Function uh ($STR)
{
$tarr = Array (
" ",
"<\\1\\2\\3>",//If you want to clear unsafe labels directly, you can leave this blank
"\\1\\2",
);
$farr = Array (
"/\s+/",//filter Extra blanks
"/< (\/?) (script|i?frame|style|html|body|title|link|meta|\?| \%) ([^>]*?) >/isu ",//Filter "/(<[^>]*) on[a-za-z]+\s*= ([^>]*>)/isu ",//filter on the JavaScript on event
);
$str = Preg_replace ($farr, $tarr, $STR);
return $str;
}
http://www.bkjia.com/PHPjc/629760.html www.bkjia.com true http://www.bkjia.com/PHPjc/629760.html techarticle PHP Filter HTML PHP Filtering HTML code Filtering HTML ASP filtering the HTML filtering the Code filtering HTML tag ASP filtering HTML code functionuh ($STR) {$tarr =array (, <\\1\\2\\3> ,//If you want to direct ...