Commit 56f96fe5 authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Put back the fallback for the case javascript is disabled and also handle the case with no anchor.

parent 0a0a9038
......@@ -463,12 +463,18 @@ html_template = """
<html>
<head>
<script>
// Redirect to the new-style URL
var new_location = '{0}'
// Some browsers include the hash character in the anchor, strip it out
const anchor = window.location.hash.replace(/^#(.*)/, '$1');
if (anchor){{
new_location += '#' + anchor;
}}
// Redirect to the new-style URL
window.location = '{}#' + anchor;
window.location = new_location
</script>
<meta http-equiv="refresh" content="1; url={0}:" />
</head>
</html>
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment