[wp-trac] [WordPress Trac] #17923: add_query_arg() should encode values

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 28 23:20:43 UTC 2011


#17923: add_query_arg() should encode values
--------------------------+-----------------------------
 Reporter:  Viper007Bond  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  General       |     Version:  3.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+-----------------------------

Comment (by azaozz):

 Perhaps better to leave the urlencoding to the function that uses
 `add_query_arg()` as having `&` or `=` in the name or value is uncommon.
 Example:
 {{{
 add_query_arg( '_wp_http_referer', urlencode(
 stripslashes($_SERVER['REQUEST_URI']) ) )
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17923#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list