Php filter unsafe character functions. Function functionuh ($ str) {$ farrarray (s +) for filtering unsafe characters in php (?) (Script | I? Frame | style | html | body | title | link | meta |? | %) ([^] *?) IsU, filtering scr
Php character filter function
Function uh ($ str)
{
$ Farr = array (
"// \ S +/", // filter unnecessary spaces
"/<(\/?) (Script | I? Frame | style | html | body | title | link | meta | \? | \ %) ([^>] *?)> /IsU ", // filter"/(<[^>] *) On [a-zA-Z] + \ s * = ([^>] *>)/isU ", // filter JavaScript on events
);
$ Tarr = array (
"",
"<\ 1 \ 2 \ 3>", // leave this field blank if you want to clear insecure labels directly.
"\ 1 \ 2 ",
);
$ Str = preg_replace ($ farr, $ tarr, $ str );
Return $ str;
Using function uh ($ str) {$ farr = array (/\ s +/, // filter excess spaces /(\/?) (Script | I? Frame | style | html | body | title | link | meta | \? | \ %) ([^] *?) /IsU, // filter scr...