This seems like a bug with urlencode_deep
function:
print_r( urlencode_deep( array( 'width' => '80%' ) ) );
The result of that is:
Array
(
[width] => 80%25
)
Notice the extra 25 in the parameter.
The why:
I'm using add_query_arg
function which in turn uses urlencode_deep
function on all the parameters from the URI passed to the function. The problem is urlencode_deep
function messes up one of parameters sent, so this:
http://site.com/?width=80%
Which is valid URL, inside the add_query_arg
function becomes:
Array
(
[width] => 80%25
)
Any idea why?