4.2.1 paranoid
There is no translation yet for this section. Please help out and translate this.. More information about translations
paranoid(string $string, array $allowedChars);
This function strips anything out of the target $string that is not a plain-jane alphanumeric character. The function will overlook certain characters by passing them in $allowedChars array.
$badString = ";:<script><html>< // >@@#";
echo Sanitize::paranoid($badString);
// output: scripthtml
echo Sanitize::paranoid($badString, array(' ', '@'));
// output: scripthtml @@
$badString = ";:<script><html>< // >@@#";echo Sanitize::paranoid($badString);// output: scripthtmlecho Sanitize::paranoid($badString, array(' ', '@'));// output: scripthtml @@


























