diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:44:16 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:44:16 +0200 |
| commit | 1b50c829ef383705647d0c2df7c89e9051ec40fb (patch) | |
| tree | 036df47c7cf94424f04d7ff9dac371fb79e2b1e4 /odoo/http.py | |
| parent | 0c2e018d4c416d0f47a3b64f1c28ce067dbab291 (diff) | |
| parent | 9713dc2e1f515b1260eaf26ec6bbfd5443f37d65 (diff) | |
[MERGE] forward port branch saas-15 up to 9713dc2e1f5
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 0b3ad105e39..c32d0178b8a 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -167,6 +167,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 |
