aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorAlejandro Mendoza <[email protected]>2023-04-30 15:31:26 -0600
committerGitHub <[email protected]>2023-05-01 00:31:26 +0300
commita06c2e6b5f8cd3debdd8b9bd2765681aba8680ad (patch)
tree1abfff4f2a3f0fe98051151dafbee968a5520807 /js/src
parent27954217168f5293391a7f672bec69d5b27ca4dd (diff)
downloadbootstrap-a06c2e6b5f8cd3debdd8b9bd2765681aba8680ad.tar.xz
bootstrap-a06c2e6b5f8cd3debdd8b9bd2765681aba8680ad.zip
Fix scrollspy and accented anchor links (#38502)
Diffstat (limited to 'js/src')
-rw-r--r--js/src/scrollspy.js4
1 files changed, 2 insertions, 2 deletions
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)
}
}