From a06c2e6b5f8cd3debdd8b9bd2765681aba8680ad Mon Sep 17 00:00:00 2001 From: Alejandro Mendoza <31571759+alemendoza-v@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:31:26 -0600 Subject: Fix scrollspy and accented anchor links (#38502) --- js/src/scrollspy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/src') diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 0b1747c8a..69de7151b 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -208,11 +208,11 @@ class ScrollSpy extends BaseComponent { continue } - const observableSection = SelectorEngine.findOne(anchor.hash, this._element) + const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element) // ensure that the observableSection exists & is visible if (isVisible(observableSection)) { - this._targetLinks.set(anchor.hash, anchor) + this._targetLinks.set(decodeURI(anchor.hash), anchor) this._observableSections.set(anchor.hash, observableSection) } } -- cgit v1.2.3