#47888 closed defect (bug) (fixed)
Adding a custom link in menu via Customize doesn't trim whitespace.
Reported by: | donmhico | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.2.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Steps to reproduce bug.
- Click "Customize" on any front-end page.
- Try to add / edit a Menu and add a Custom Link.
The following behaviour happens.
- If the URL has a whitespace in front. e.g.
https://wp.org/
- URL field box will have red border and the custom link won't be added.
- If the URL has a whitespace in the end. e.g.
https://wp.org/
- Custom link will be added but if the menu will have the link
https://wp.org/%20
- Custom link will be added but if the menu will have the link
I think it would be best if the URL is trimmed before the checking of URL regex happens.
Attachments (2)
Change History (13)
#3
@
5 years ago
- Component changed from General to Menus
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to 5.2.3
- Owner set to audrasjb
- Status changed from new to assigned
Moving to 5.2.3: we should handle this ticket alongside #47723
#4
@
5 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from audrasjb to SergeyBiryukov
- Status changed from assigned to reviewing
#6
@
5 years ago
- Status changed from reviewing to accepted
Thanks @donmhico
47888.diff
works like a charm on my side (see screenshot above).
Good to go :)
This ticket was mentioned in Slack in #core by marybaum. View the logs.
5 years ago
Note: See
TracTickets for help on using
tickets.
See #47723.