Commit 83f367b0 authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_xhtml_style: Do not redirect to external referer in Base_doLanguage

parent ab4fdf24
...@@ -17,7 +17,8 @@ if website is not None and website.isStaticLanguageSelection(): ...@@ -17,7 +17,8 @@ if website is not None and website.isStaticLanguageSelection():
re.escape(root_website_url), re.escape(root_website_url),
'|'.join('/' + re.escape(x) for x in root_website.getAvailableLanguageList())) '|'.join('/' + re.escape(x) for x in root_website.getAvailableLanguageList()))
referer_url = context.REQUEST.HTTP_REFERER referer_url = context.REQUEST.HTTP_REFERER
if referer_url: topmost_url_document = context.Base_getURLTopmostDocumentValue()
if referer_url and topmost_url_document.isURLAncestorOf(referer_url):
if select_language == default_language: if select_language == default_language:
redirect_url = re.sub(website_url_pattern, root_website_url + r'\1', referer_url) redirect_url = re.sub(website_url_pattern, root_website_url + r'\1', referer_url)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment