[wp-trac] [WordPress Trac] #21631: HTML encoded characters in the custom menu's URL html are decoded after first save and removed after second save
WordPress Trac
noreply at wordpress.org
Sun Jul 13 19:19:11 UTC 2014
#21631: HTML encoded characters in the custom menu's URL html are decoded after
first save and removed after second save
--------------------------+------------------------------
Reporter: rocketwood | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 3.4.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+------------------------------
Comment (by mordauk):
I've just confirmed the bug.
If we enter `http://wpdev:8888/?p=1&somevar[]=24&somevar[]=25` into the
URL of a custom link, we should get
`http://wpdev:8888/?p=1&somevar[]=24&somevar[]=25` back.
When the menu item is added, we actually get
`http://wpdev:8888/?p=1&somevar=24&somevar=25` instead.
While it does work to use encoded values, how is a user supposed to know
they should do that. WordPress should allow a non-encoded URL to be added
and render that properly.
This appears to be due to `esc_url()`.
{{{
echo esc_url( 'http://wpdev:8888/?p=1&somevar[]=24&somevar[]=25' );
}}}
gives us `http://wpdev:8888/?p=1&somevar=24&somevar=25`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21631#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list