[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 15:10:59 +02:00
parent 3074835079
commit a1328c9054
1 changed files with 2 additions and 2 deletions

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);
});