diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:39:59 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:39:59 +0200 |
| commit | 9713dc2e1f515b1260eaf26ec6bbfd5443f37d65 (patch) | |
| tree | 18250e927df2a339d616206b99d23edf0d13c6b3 /odoo/http.py | |
| parent | 6c94264f99333fda0337169b8a51ef8b30edebf9 (diff) | |
| parent | 96595772e0859cc272bc022ab8c22852ba3d06f3 (diff) | |
[MERGE] forward port branch saas-14 up to 96595772e08
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 2 |
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 |
