[wp-trac] [WordPress Trac] #16859: esc_url eats square brackets.

WordPress Trac noreply at wordpress.org
Sat Jun 8 01:50:34 UTC 2013


#16859: esc_url eats square brackets.
------------------------------------+------------------------------
 Reporter:  f00f                    |       Owner:  westi
     Type:  defect (bug)            |      Status:  accepted
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Formatting              |     Version:  3.1
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by rcain):

 i would like to add my voice to calls for a solution here also please.

 i want to be able to inject dynamic data such as bp_loggedin_user_domain()
 into conventional wp menu url's using conventional wp short-code syntax
 ie. square brackets.

 unfortunately, wp_update_nav_menu_item() calls esc_url_raw($args['menu-
 item-url'] directly - no filters available and subsequently esc_url_raw()
 uses hard-coded pregmatch string, also without filter around it. thus, it
 is impossible to 'filter' this data at all, without hacking core - which i
 refuse to do.

 please can we have some additional filter hooks defined/implemented?
 either around/inside call to esc_ulr, esc_url_raw or just around the
 pregmatch string(s) itself/themselves, inside esc_url.

 this would help me and many others greatly.

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


More information about the wp-trac mailing list