Move the stripslashes(), and change it to stripslashes_deep(). Props mdawaffe. fixes #4105

git-svn-id: https://develop.svn.wordpress.org/trunk@5200 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-04-07 01:24:40 +00:00
parent 2e64f813ec
commit 2ea44df759
1 changed files with 2 additions and 2 deletions

View File

@ -806,6 +806,8 @@ function add_query_arg() {
}
parse_str($query, $qs);
if ( get_magic_quotes_gpc() )
$qs = stripslashes_deep($qs); // parse_str() adds slashes if magicquotes is on. See: http://php.net/parse_str
if ( is_array(func_get_arg(0)) ) {
$kayvees = func_get_arg(0);
$qs = array_merge($qs, $kayvees);
@ -826,8 +828,6 @@ function add_query_arg() {
}
$ret = trim($ret, '?');
$ret = $protocol . $base . $ret . $frag;
if ( get_magic_quotes_gpc() )
$ret = stripslashes($ret); // parse_str() adds slashes if magicquotes is on. See: http://php.net/parse_str
return $ret;
}