Skip to content

Commit

Permalink
Meta: Fix link-fixup.js to support percent-escaped fragid
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan authored and domenic committed Apr 19, 2017
1 parent 77c694e commit 84a2b22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions link-fixup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
return;
}

var fragid = window.location.hash.substr(1);
var fragid = decodeURIComponent(window.location.hash.substr(1));

if (fragid && document.getElementById(fragid)) {
return;
Expand All @@ -27,7 +27,7 @@

var page = fragmentLinks[fragid];
if (page) {
window.location.replace(page + '.html#' + fragid);
window.location.replace(page + '.html#' + encodeURIComponent(fragid));
}
};
xhr.send();
Expand Down

0 comments on commit 84a2b22

Please sign in to comment.