[wp-trac] [WordPress Trac] #25567: Nav menus strip out square brackets in url's

WordPress Trac noreply at wordpress.org
Fri Oct 11 14:53:34 UTC 2013


#25567: Nav menus strip out square brackets in url's
--------------------------+------------------------------
 Reporter:  frisco        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  3.6.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> Similar to [http://core.trac.wordpress.org/ticket/24663/ trac ticket
> 24663] or [http://core.trac.wordpress.org/ticket/16859 trac ticket
> 16859], nav menus strip out square brackets in URL's, starting with line
> 390 of wp-includes/nav-menu.php, because of esc_raw_url().  Behavior
> exists in trunk as well as 3.6.1.
>
> Square brackets in URL's are needed for query parameters with Elastic
> Search, and it's helpful to put these pre-built queries into menus.
> There are probably other use cases as well.  The brackets can be encoded,
> which works fine, but should average users be expected to encode menu
> URL's?
>
> Is there another way to safely use URL's without stripping square
> brackets?

New description:

 Similar to trac ticket #24663 or trac ticket #16859, nav menus strip out
 square brackets in URL's, starting with line 390 of wp-includes/nav-
 menu.php, because of esc_raw_url().  Behavior exists in trunk as well as
 3.6.1.

 Square brackets in URL's are needed for query parameters with Elastic
 Search, and it's helpful to put these pre-built queries into menus.  There
 are probably other use cases as well.  The brackets can be encoded, which
 works fine, but should average users be expected to encode menu URL's?

 Is there another way to safely use URL's without stripping square
 brackets?

--

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


More information about the wp-trac mailing list