[FIX] website: url_for() does not mess up anchor links

bzr revid: chs@openerp.com-20140129195025-i2ey682o6marp8k1
This commit is contained in:
Christophe Simonis 2014-01-29 20:50:25 +01:00
parent c202dc1c52
commit 3d80e31012
1 changed files with 1 additions and 1 deletions

View File

@ -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')