#47723 closed defect (bug) (fixed)
Adding a custom link in nav-menus.php doesn't trim whitespace
| Reported by: | majemedia | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2.3 |
| Component: | Menus | Version: | |
| Severity: | minor | Keywords: | good-first-bug fixed-major |
| Cc: | Focuses: | ui |
Description
When building a nav-menu and utilizing custom links the entered value isn't trimmed.
Once you click 'Add to Menu':
- If you have whitespace at the start: no url added to the custom link in the menu item
- If you have whitespace at the end: %20 is added to the custom link
Attachments (1)
Change History (16)
#1
@
7 years ago
- Focuses administration removed
- Keywords needs-patch good-first-bug added; dev-feedback removed
- Owner set to
- Status new → accepted
- Version 5.2.2
This ticket was mentioned in Slack in #core by majemedia. View the logs.
7 years ago
#7
@
7 years ago
- Keywords needs-testing fixed-major added
- Milestone 5.3 → 5.2.3
- Resolution fixed
- Status closed → reopened
Reopening this so it can be back-ported to the 5.2 branch.
Also adding needs-testing keyword to validate if this ticket is good to land in 5.2.3 (should be ok though).
#8
@
7 years ago
I've tested the fix against a 5.2 branch checkout and its working as expected to me with no regressions.
Tested:
- Leading space
- Ending space
- Leading and ending space
- No leading/ending space
Note that I did not apply the test file generated by the original trunk commit.
#10
@
7 years ago
+1 Patch applies cleanly and problem resolves. However it's good to point out that the issue with ending whitespace still happens when you add the custom link via Customizer. But I think that can be another ticket.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi and thanks for your report.
Milestoning this one to next major.