blob: b45db62dce16933476821373da3fcd1e6baf2b1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
%h1.page-title.gl-font-size-h-display= _("Redirecting")
%div
%a{ :href => redirect_uri } Click here to redirect to #{redirect_uri}
= javascript_tag do
:plain
(function() {
// Only permit a basic set of characters in the fragment.
const allowedRegex = /^#[\w-]+$/g;
const hash = window.location.hash;
let redirectUri = "#{redirect_uri}";
if (window.location.hash && window.location.hash.search(allowedRegex) === 0 && redirectUri.indexOf('#') === -1) {
redirectUri = redirectUri + hash;
}
window.location = redirectUri;
})();
|