[FIX] Fix url slug check bug in multilang=True
bzr revid: fme@openerp.com-20140325140026-0qdx9zl21za8gto9
This commit is contained in:
parent
c2e7a69eba
commit
329c19f94e
|
@ -91,7 +91,12 @@ class ir_http(orm.AbstractModel):
|
|||
assert path is not None
|
||||
except Exception:
|
||||
return self._handle_exception(werkzeug.exceptions.NotFound())
|
||||
if path != werkzeug.url_quote(request.httprequest.path):
|
||||
|
||||
generated_path = werkzeug.url_unquote_plus(path)
|
||||
current_path = werkzeug.url_unquote_plus(request.httprequest.path)
|
||||
if generated_path != current_path:
|
||||
if request.lang != request.website.default_lang_code:
|
||||
path = '/' + request.lang + path
|
||||
return werkzeug.utils.redirect(path)
|
||||
|
||||
def _handle_exception(self, exception=None, code=500):
|
||||
|
|
Loading…
Reference in New Issue