Opened 5 years ago
Last modified 5 years ago
#46966 new defect (bug)
urlencode query string parameters
Reported by: | developernichemarketing | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | |
Component: | Formatting | Keywords: | needs-patch |
Focuses: | Cc: |
Description
When adding query string arguments to a URL through add_query_arg() the arguments are not being URL encoded.
An example of this
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
Note: See
TracTickets for help on using
tickets.
Related: #17923