Commit 52b6031d authored by Jean-Paul Smets's avatar Jean-Paul Smets

Better support of base URL

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25566 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 71ec9b7d
...@@ -240,10 +240,11 @@ class TextDocument(Document, TextContent): ...@@ -240,10 +240,11 @@ class TextDocument(Document, TextContent):
Returns the content base URL based on the actual content Returns the content base URL based on the actual content
(in HTML) (in HTML)
""" """
html = self._asHTML() if self.hasBaseData():
base_list = re.findall(self.base_parser, str(html)) html = self._asHTML()
if base_list: base_list = re.findall(self.base_parser, str(html))
return base_list[0] if base_list:
return base_list[0]
return Document.getContentBaseURL(self) return Document.getContentBaseURL(self)
security.declareProtected(Permissions.AccessContentsInformation, 'hasBaseData') security.declareProtected(Permissions.AccessContentsInformation, 'hasBaseData')
......
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