From a1328c9054c1907ce4996811bb7befc6ca031a7f Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 10 Aug 2015 15:10:59 +0200 Subject: [PATCH] [FIX] website: escaped hash and url To be valid for the redirection, the url and the hash must be percent encoded. opw:646837 --- addons/website/static/src/js/website.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index b2387745e4e..b12a33f9952 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -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); });