[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 21:00:49 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: accepted
Component: Menus | Milestone: 4.9
Severity: normal | Version: 4.9
Keywords: has-patch needs-testing needs-unit- | Resolution:
tests | Focuses: javascript
-------------------------------------------------+-------------------------
Changes (by westonruter):
* keywords: has-patch needs-testing needs-refresh needs-unit-tests => has-
patch needs-testing needs-unit-tests
Comment:
Clearly the regular expression we incorporated was not robust enough,
while also being overly complicated. In [attachment:42506.2.diff] I've
replaced it with a much simpler set of checks to confirm it roughly looks
like a URL. Any further validation will then be handled on the server by
`WP_Customize_Nav_Menu_Item_Setting::sanitize()` and `esc_url_raw()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42506#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list