Skip to content

Commit 36c6a8b

Browse files
committed
feat: update default HTML template to preserve url fragments
1 parent 7b3cf64 commit 36c6a8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx_reredirects/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
OPTION_TEMPLATE_FILE_DEFAULT = None
1818

1919
REDIRECT_FILE_DEFAULT_TEMPLATE = (
20-
'<html><head><meta http-equiv="refresh" content="0; url=${to_uri}"></head></html>' # noqa: E501
20+
'<html><head><noscript><meta http-equiv="refresh" content="0; url=${to_uri}" /></noscript><script>var target = "${to_uri}";if (window.location.hash) {window.location.replace(target + window.location.hash);} else {window.location.replace(target);}</script></head></html>' # noqa: E501
2121
)
2222

2323
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)