#47888 closed defect (bug) (fixed)
Adding a custom link in menu via Customize doesn't trim whitespace.
| Reported by: | donmhico | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2.3 |
| Component: | Menus | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
7 years ago
- Component General → Menus
- Keywords needs-patch added; has-patch removed
- Milestone Awaiting Review → 5.2.3
- Owner set to
- Status new → assigned
Moving to 5.2.3: we should handle this ticket alongside #47723
#4
@
7 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from to
- Status assigned → reviewing
#6
@
7 years ago
- Status reviewing → 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.
7 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
See #47723.