Make WordPress Core

Opened 6 years ago

Last modified 7 weeks ago

#46966 new defect (bug)

urlencode query string parameters

Reported by: developernichemarketing's profile developernichemarketing Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: trunk
Component: Formatting Keywords: has-patch needs-testing
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

Attachments (1)

46966.patch (682 bytes) - added by vishalpadhariya 7 weeks ago.

Download all attachments as: .zip

Change History (3)

#2 @vishalpadhariya
7 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed
  • Version set to trunk

I have fixed the issue with URL-encoding query string parameters. Please find the attached patch.

Note: See TracTickets for help on using tickets.