[wp-trac] [WordPress Trac] #18814: wp_redirect wont allow arrays to be sent in query string

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 3 17:04:53 UTC 2011


#18814: wp_redirect wont allow arrays to be sent in query string
-------------------------+------------------------------
 Reporter:  jacksplay    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  3.2.1
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by jacksplay):

 Just to update for other users searching about this issue.

 You will need to encode this when sending an array to another script or in
 my case I needed to send a link in an email with the array.


 {{{
 $query =str_replace(array('[',']'), array('%5B','%5D'), $query);
 }}}


 url_encode() will not encode the brackets because the square bracket is
 allowed in a URI.

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


More information about the wp-trac mailing list