diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-02-09 22:22:38 +0300 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-02-11 00:09:08 +0300 |
commit | c34517ad8b5248a6c40eb59152347c45ac0d0ec8 (patch) | |
tree | 1746c4a65e4a3ce1023dd5ed1fb84f7a1619ff4d /app/assets/javascripts/lib | |
parent | 5430849ca55192b78f7bfb35fdabaa3356e15035 (diff) |
Add js prefix to right sidebar
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 2d4f1d3dbe7..bcb3a706b51 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); + // scroll to user-generated markdown anchor if we cannot find a match if (document.getElementById(hash) === null) { var target = document.getElementById('user-content-' + hash); |