Run rawurlencode_deep() through the parsed query in canonical. (Introduces rawurlencode_deep().) props toppa for the initial patch. fixes #20143.

git-svn-id: https://develop.svn.wordpress.org/trunk@20611 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-04-27 15:40:00 +00:00
parent 98f553c3b2
commit ef79a85f78
2 changed files with 13 additions and 3 deletions
+12 -2
View File
@@ -1339,8 +1339,6 @@ function stripslashes_deep($value) {
/**
* 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
*
@@ -1352,6 +1350,18 @@ function urlencode_deep($value) {
return $value;
}
/**
* 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.
*