[wp-trac] Re: [WordPress Trac] #4084: add_query_arg urldecodes
passed values but doesn't re-encode them.
WordPress Trac
wp-trac at lists.automattic.com
Sat Apr 7 00:04:53 GMT 2007
#4084: add_query_arg urldecodes passed values but doesn't re-encode them.
-----------------------+----------------------------------------------------
Reporter: mdawaffe | Owner: rob1n
Type: defect | Status: reopened
Priority: low | Milestone: 2.2
Component: General | Version: 2.2
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------+----------------------------------------------------
Changes (by mdawaffe):
* status: closed => reopened
* resolution: fixed =>
Comment:
This ticket urlencodes every argument. Perhaps we should only urlencode
those arguments that have passed through parse_str? That would keep
things as backward compatible as possible.
What we do now (urlencoding everything, even new arguments) makes the most
since but is not backward compatible.
For example, there are a few places in core (and surely plugins too) that
do:
{{{
add_query_arg( 'foo', urlencode($bar), $url );
}}}
That is, the arg is manually urlencoded. Those args will probably now get
double encoded with the current code in trunk.
So do we go for a function that works like (I think) it seems like it
should, or do we go with a less convenient function that preserves
backward compatibility?
Related to #4105 (slash behavior)
--
Ticket URL: <http://trac.wordpress.org/ticket/4084#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list