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

git-svn-id: http://svn.automattic.com/wordpress/trunk@5200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-04-07 01:24:40 +00:00
parent 4a4d37f9f3
commit f826cb98cc

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;
}