diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2017-02-07 17:53:42 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-02-07 17:53:42 +0000 |
commit | bc13687c7e374116e4830d004b82e9960d3a55cc (patch) | |
tree | 36a787c2c38442237d5b3616d4e14189d1bd4379 /app/assets/javascripts/lib | |
parent | 840072ec0491535a180a8d270327d37152b60295 (diff) | |
parent | bcf81d82faf6db44a68d2c1148a693b59806057e (diff) | |
download | gitlab-ce-bc13687c7e374116e4830d004b82e9960d3a55cc.tar.gz |
Merge branch 'fix-anchor-scrolling' into 'master'
Fix broken anchor links when special characters are used
Closes #26778
See merge request !8961
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js.es6 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js.es6 b/app/assets/javascripts/lib/utils/common_utils.js.es6 index 0ee29a75c62..1f735e13391 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js.es6 +++ b/app/assets/javascripts/lib/utils/common_utils.js.es6 @@ -69,6 +69,9 @@ var hash = w.gl.utils.getLocationHash(); if (!hash) return; + // This is required to handle non-unicode characters in hash + hash = decodeURIComponent(hash); + var navbar = document.querySelector('.navbar-gitlab'); var subnav = document.querySelector('.layout-nav'); var fixedTabs = document.querySelector('.js-tabs-affix'); |