[FIX] website: escaped hash and url

To be valid for the redirection, the url and the hash
must be percent encoded.

opw:646837
This commit is contained in:
Goffin Simon
2015-08-10 16:18:16 +02:00
parent 3074835079
commit a1328c9054
+2 -2
View File
@@ -368,8 +368,8 @@
// retrieve the hash before the redirect
var redirect = {
lang: self.data('lang'),
url: self.attr('href'),
hash: location.hash
url: encodeURIComponent(self.attr('href')),
hash: encodeURIComponent(location.hash)
};
location.href = _.str.sprintf("/website/lang/%(lang)s?r=%(url)s%(hash)s", redirect);
});