[wp-trac] [WordPress Trac] #42506: Customize: Custom Link URL validation for nav menu items doesn't allow jump links

WordPress Trac noreply at wordpress.org
Fri Nov 10 23:42:19 UTC 2017


#42506: Customize: Custom Link URL validation for nav menu items doesn't allow jump
links
-------------------------------------------------+-------------------------
 Reporter:  ravipatel                            |       Owner:
     Type:  defect (bug)                         |  westonruter
 Priority:  normal                               |      Status:  closed
Component:  Menus                                |   Milestone:  4.9
 Severity:  normal                               |     Version:  4.9
 Keywords:  has-patch needs-testing needs-unit-  |  Resolution:  fixed
  tests dev-reviewed                             |     Focuses:  javascript
-------------------------------------------------+-------------------------

Comment (by westonruter):

 In [changeset:"42154"]:
 {{{
 #!CommitTicketReference repository="" revision="42154"
 Customize: Restore ability to add Custom Link nav menu items for jump
 links and other URLs that were previously allowed.

 Simplify regular expression for checking URL validity to just do basic
 checks to confirm the value looks like a URL. Leave the complete
 validation to the server-side logic in
 `WP_Customize_Nav_Menu_Item_Setting::sanitize()` to avoid having to
 maintain two separate codebases for validating URLs.

 Props westonruter, SergeyBiryukov for testing.
 Amends [41697].
 See #32816.
 Fixes #42506 for 4.9.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42506#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list