As you know, when Magic Quotes is turned on, single quotes are escaped in values as well as in keys. Most runtime magic quotes removal solutions have only unescape values, not keys. I am looking for a solution that will override keys and values ...
I recognized this code snippet on PHP.net:
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process);
But I don't like "&" links and arrays as I had errors like this in the past ...
Is there a better way to unescape Magic Quotes (keys and values) at run time than the previous one?
php magic-quotes
AlexV
source share