Commit a64ceb40 authored by Jérome Perrin's avatar Jérome Perrin

web: fix refered object extractions when page is in context of web site

Base_extractReferredObjectDictFromHtml except that base url to have a
leading /, because we ignore the first character of the normalized URL
returned by Base_normalizeUrlPathname.

By using / as base URL when we are in the context of the website, the
paths passed to Base_normalizeUrlPathname always start by / so we can
safely drop / from the normalized path returned by
Base_normalizeUrlPathname
parent 5719b220
......@@ -122,7 +122,7 @@ else:
root_url = base_url_root_object.absolute_url()
base_url = base_url_object.absolute_url()
base_path = "."
base_path = "/"
if base_url_object.getRelativeUrl().startswith(base_url_root_object.getRelativeUrl()):
base_path = base_url_object.getRelativeUrl()[len(base_url_root_object.getRelativeUrl()):]
if base_path and not base_path.startswith("/"):
......
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