From 2ea44df759e1c62901b2759beabf1c2a5fefcb3e Mon Sep 17 00:00:00 2001 From: rob1n Date: Sat, 7 Apr 2007 01:24:40 +0000 Subject: [PATCH] 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 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 3ebd32eac7..ffa7fe3861 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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; }