summaryrefslogtreecommitdiff
path: root/odoo/http.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-06-15 18:39:59 +0200
committerChristophe Simonis <chs@odoo.com>2017-06-15 18:39:59 +0200
commit9713dc2e1f515b1260eaf26ec6bbfd5443f37d65 (patch)
tree18250e927df2a339d616206b99d23edf0d13c6b3 /odoo/http.py
parent6c94264f99333fda0337169b8a51ef8b30edebf9 (diff)
parent96595772e0859cc272bc022ab8c22852ba3d06f3 (diff)
[MERGE] forward port branch saas-14 up to 96595772e08
Diffstat (limited to 'odoo/http.py')
-rw-r--r--odoo/http.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/http.py b/odoo/http.py
index cef63e8f639..94ec3b8c752 100644
--- a/odoo/http.py
+++ b/odoo/http.py
@@ -163,6 +163,8 @@ def redirect_with_hash(url, code=303):
# See extensive test page at http://greenbytes.de/tech/tc/httpredirects/
if request.httprequest.user_agent.browser in ('firefox',):
return werkzeug.utils.redirect(url, code)
+ if urlparse.urlparse(url, scheme='http').scheme not in ('http', 'https'):
+ url = 'http://' + url
url = url.replace("'", "%27").replace("<", "%3C")
return "<html><head><script>window.location = '%s' + location.hash;</script></head></html>" % url