Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.756.2.24 diff -u -p -r1.756.2.24 common.inc --- includes/common.inc 13 Aug 2008 23:59:12 -0000 1.756.2.24 +++ includes/common.inc 18 Sep 2008 09:12:18 -0000 @@ -207,7 +207,7 @@ function drupal_query_string_encode($que $params = array(); foreach ($query as $key => $value) { - $key = drupal_urlencode($key); + $key = rawurlencode($key); if ($parent) { $key = $parent .'['. $key .']'; } @@ -220,7 +220,7 @@ function drupal_query_string_encode($que $params[] = drupal_query_string_encode($value, $exclude, $key); } else { - $params[] = $key .'='. drupal_urlencode($value); + $params[] = $key .'='. rawurlencode($value); } } @@ -2344,6 +2344,8 @@ function drupal_json($var = NULL) { * characters are double escaped so PHP will still see the encoded version. * - With clean URLs, Apache changes '//' to '/', so every second slash is * double escaped. + * - This function should not be used on query strings, or URLs that contain + * query strings, otherwise unwanted double encoding will occur. * * @param $text * String to encode