Skip to content

Instantly share code, notes, and snippets.

@voxpelli
Created November 30, 2008 17:18
Show Gist options
  • Save voxpelli/30484 to your computer and use it in GitHub Desktop.
Save voxpelli/30484 to your computer and use it in GitHub Desktop.
if (get_magic_quotes_gpc()) {
function strip_the_slashes($array) {
foreach($array as $key => $value) {
if (is_array($value)) {
$value = strip_the_slashes($value);
} else {
$value = stripslashes($value);
}
$array[$key] = $value;
}
return $array;
}
$_POST = strip_the_slashes($_POST);
$_GET = strip_the_slashes($_GET);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment