From 72c0d63718073874de317dd6f952e38412943d98 Mon Sep 17 00:00:00 2001 From: Luffy Date: Thu, 2 Apr 2026 10:44:06 +0800 Subject: [PATCH] fix: enhance sidebar navigation link selection for decoded URLs (#2708) --- src/core/render/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/render/index.js b/src/core/render/index.js index 9e546a3d01..f4db193754 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -314,7 +314,9 @@ export function Render(Base) { sidebarToggleEl.setAttribute('aria-expanded', String(!isMobile())); - const activeElmHref = this.router.toURL(this.route.path); + const activeElmHref = decodeURIComponent( + this.router.toURL(this.route.path), + ); const activeEl = /** @type {HTMLElement | null} */ ( dom.find(`.sidebar-nav a[href="${activeElmHref}"]`) );