urlencode_deep function and wrong URL
-
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 usingadd_query_arg
function which in turn usesurlencode_deep
function on all the parameters from the URI passed to the function. The problem isurlencode_deep
function messes up one of parameters sent, so this:https://site.com/?width=80%
Which is valid URL, inside the
add_query_arg
function becomes:Array ( [width] => 80%25 )
Any idea why?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘urlencode_deep function and wrong URL’ is closed to new replies.