Sanitizes data so that Cross Site Scripting Hacks can be
prevented. This method does a fair amount of work but
it is extremely thorough, designed to prevent even the
most obscure XSS attempts. Nothing is ever 100% foolproof,
of course, but I haven't been able to get anything passed
the filter.
Note: Should only be used to deal with data upon submission.
It's not something that should be used for general
runtime processing.
public xss_clean ( mixed $str ) : string | array | boolean | ||
$str | mixed | input data e.g. string or array |
return | string | array | boolean | boolean: will return a boolean, if the "is_image"-parameter is true string: will return a string, if the input is a string array: will return a array, if the input is a array |