function sanitizeSysString($string, $min = '', $max = '')
{
$pattern = '/(;|||`|>|<|&|^|"|'."n|r|'".'|{|}|[|]|)|()/i';
$string = preg_replace($pattern, '', $string);
$string = '"'.preg_replace('/$/', '\$', $string).'"';
$len = strlen($string);
if((($min != '') && ($len < $min)) || (($max != '') && ($len > $max)))
return FALSE;
return $string;
}
|