diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:46:47 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-15 18:46:47 +0200 |
| commit | ed2ddeccdfaac46acb4d4bfbdac5f1b570f0829c (patch) | |
| tree | 5d0c41f089c8deddd753a7ec61217ee33d007451 /odoo/http.py | |
| parent | 156e07f6387b3e2b8915b1bd8624195d7110c3f5 (diff) | |
| parent | 1b50c829ef383705647d0c2df7c89e9051ec40fb (diff) | |
[MERGE] forward port branch saas-16 up to 1b50c829ef3
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 b0d50941937..622a7b47fbd 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -162,6 +162,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 |
