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 = """ ...@@ -463,12 +463,18 @@ html_template = """
<html> <html>
<head> <head>
<script> <script>
// Redirect to the new-style URL
var new_location = '{0}'
// Some browsers include the hash character in the anchor, strip it out // Some browsers include the hash character in the anchor, strip it out
const anchor = window.location.hash.replace(/^#(.*)/, '$1'); const anchor = window.location.hash.replace(/^#(.*)/, '$1');
if (anchor){{
// Redirect to the new-style URL new_location += '#' + anchor;
window.location = '{}#' + anchor; }}
window.location = new_location
</script> </script>
<meta http-equiv="refresh" content="1; url={0}:" />
</head> </head>
</html> </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