Index: wp-includes/canonical.php
===================================================================
--- wp-includes/canonical.php	(revision 20550)
+++ wp-includes/canonical.php	(working copy)
@@ -292,7 +292,7 @@
 				unset( $_parsed_query['name'] );
 		}
 
-		$_parsed_query = array_map( 'rawurlencode', $_parsed_query );
+		$_parsed_query = rawurlencode_deep( $_parsed_query );
 		$redirect_url = add_query_arg( $_parsed_query, $redirect_url );
 	}
 
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 20550)
+++ wp-includes/formatting.php	(working copy)
@@ -1339,8 +1339,6 @@
 /**
  * Navigates through an array and encodes the values to be used in a URL.
  *
- * Uses a callback to pass the value of the array back to the function as a
- * string.
  *
  * @since 2.2.0
  *
@@ -1353,6 +1351,18 @@
 }
 
 /**
+ * Navigates through an array and raw encodes the values to be used in a URL.
+ *
+ * @since 3.4.0
+ *
+ * @param array|string $value The array or string to be encoded.
+ * @return array|string $value The encoded array (or string from the callback).
+ */
+function rawurlencode_deep( $value ) {
+	return is_array( $value ) ? array_map( 'rawurlencode_deep', $value ) : rawurlencode( $value );
+}
+
+/**
  * Converts email addresses characters to HTML entities to block spam bots.
  *
  * @since 0.71
