[FIX] website: url_for() does not mess up anchor links
bzr revid: chs@openerp.com-20140129195025-i2ey682o6marp8k1
This commit is contained in:
parent
c202dc1c52
commit
3d80e31012
|
@ -39,7 +39,7 @@ def keep_query(*args, **kw):
|
|||
def url_for(path_or_uri, lang=None):
|
||||
location = path_or_uri.strip()
|
||||
url = urlparse.urlparse(location)
|
||||
if request and not url.netloc and not url.scheme:
|
||||
if request and url.path and not url.netloc and not url.scheme:
|
||||
location = urlparse.urljoin(request.httprequest.path, location)
|
||||
force_lang = lang is not None
|
||||
lang = lang or request.context.get('lang')
|
||||
|
|
Loading…
Reference in New Issue