[FIX] redirect_with_hash firefox bug

bzr revid: fme@openerp.com-20140121160158-qsy28zty51wg7ip4
This commit is contained in:
Fabien Meghazi 2014-01-21 17:01:58 +01:00
parent 646a7de17a
commit b5118e606e
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ def redirect_with_hash(url, code=303):
# redirect. And even if IE10 pretends to support it, it still fails
# inexplicably in case of multiple redirects (and we do have some).
# 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)
return "<html><head><script>window.location = '%s' + location.hash;</script></head></html>" % url