From 63d9cbd2c1259ac8adaeb693609e721d1d2cb1d2 Mon Sep 17 00:00:00 2001 From: David Alber Date: Thu, 21 Dec 2017 20:29:44 -0800 Subject: [PATCH] Retaining the fragment identifier when redirecting Currently, if a user requests /team.html#foo and is redirected to the sv-SE language, the new location will be /sv-SE/team.html. This commit appends the fragment identifier to the redirection target. Thus, if a user is requesting /team.html#foo and is redirected to the sv-SE language, the new location will be /sv-SE/team.html#foo. --- _layouts/redirect.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/redirect.html b/_layouts/redirect.html index bdbabf7fd..8f4f69c75 100644 --- a/_layouts/redirect.html +++ b/_layouts/redirect.html @@ -42,7 +42,7 @@ // if we didn't find a supporting language, default to en-US if (!language) { language = "en-US"; } - document.location = "/" + language + '{{ page.url }}'; + document.location = "/" + language + '{{ page.url }}' + document.location.hash;