Skip to content

Commit 84a2b22

Browse files
zcorpandomenic
authored andcommitted
Meta: Fix link-fixup.js to support percent-escaped fragid
See #2552 (comment)
1 parent 77c694e commit 84a2b22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

link-fixup.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
return;
55
}
66

7-
var fragid = window.location.hash.substr(1);
7+
var fragid = decodeURIComponent(window.location.hash.substr(1));
88

99
if (fragid && document.getElementById(fragid)) {
1010
return;
@@ -27,7 +27,7 @@
2727

2828
var page = fragmentLinks[fragid];
2929
if (page) {
30-
window.location.replace(page + '.html#' + fragid);
30+
window.location.replace(page + '.html#' + encodeURIComponent(fragid));
3131
}
3232
};
3333
xhr.send();

0 commit comments

Comments
 (0)