Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#43401 closed enhancement (fixed)

Support urldecoded URLs in current menu item detection logic

Reported by: soulseekah's profile soulseekah Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Menus Keywords: has-patch has-unit-tests
Focuses: Cc:


When adding a urldecoded custom link to a menu it is not being detected as the current one when visiting it.

This doesn't work:привет/

This works:

Attachments (2)

43401.tests.patch (1.5 KB) - added by soulseekah 6 years ago.
Initial tests
43401.1.patch (1.2 KB) - added by soulseekah 6 years ago.
Initial patch

Download all attachments as: .zip

Change History (9)

#1 @SergeyBiryukov
6 years ago

  • Keywords needs-patch needs-unit-tests added

6 years ago

Initial tests

6 years ago

Initial patch

#2 @soulseekah
6 years ago

  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed

#3 @soulseekah
6 years ago

Props to @campusboy1987 for discovering and describing the issue.

#4 @campusboy1987
6 years ago

I checked the edits of @soulseekah on a couple of sites where such a problem arose. Now everything works fine! I'm looking forward to the resilience. Gennady (@soulseekah), thanks for the quick response and solution.

#5 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.0

#6 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 42732:

Menus: When checking if a Custom Link matches the current URL to add the current-menu-item class, check for decoded URL as well.

Props soulseekah, campusboy1987.
Fixes #43401.

#7 @johnbillion
6 years ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.