[wp-trac] [WordPress Trac] #46966: urlencode query string parameters

WordPress Trac noreply at wordpress.org
Wed Apr 17 22:09:07 UTC 2019


#46966: urlencode query string parameters
-------------------------------------+-----------------------------
 Reporter:  developernichemarketing  |      Owner:  (none)
     Type:  defect (bug)             |     Status:  new
 Priority:  normal                   |  Milestone:  Awaiting Review
Component:  Formatting               |    Version:
 Severity:  major                    |   Keywords:  needs-patch
  Focuses:                           |
-------------------------------------+-----------------------------
 When adding query string arguments to a URL through add_query_arg() the
 arguments are not being URL encoded.

 An example of this

 {{{#!php
 add_query_arg( 'autofocus[panel]', 'themes', admin_url( 'customize.php' )
 )
 }}}

 The [ ] characters should URL encoded

 Output:
 /wp-admin/customize.php?autofocus[panel]=themes

 Expected:
 /wp-admin/customize.php?autofocus%5Bpanel%5D=themes

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46966>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list