[Erp5-report] r25566 - /erp5/trunk/products/ERP5/Document/TextDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Feb 14 11:07:10 CET 2009
Author: jp
Date: Sat Feb 14 11:07:10 2009
New Revision: 25566
URL: http://svn.erp5.org?rev=25566&view=rev
Log:
Better support of base URL
Modified:
erp5/trunk/products/ERP5/Document/TextDocument.py
Modified: erp5/trunk/products/ERP5/Document/TextDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TextDocument.py?rev=25566&r1=25565&r2=25566&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] Sat Feb 14 11:07:10 2009
@@ -240,10 +240,11 @@
Returns the content base URL based on the actual content
(in HTML)
"""
- html = self._asHTML()
- base_list = re.findall(self.base_parser, str(html))
- if base_list:
- return base_list[0]
+ if self.hasBaseData():
+ html = self._asHTML()
+ base_list = re.findall(self.base_parser, str(html))
+ if base_list:
+ return base_list[0]
return Document.getContentBaseURL(self)
security.declareProtected(Permissions.AccessContentsInformation, 'hasBaseData')
More information about the Erp5-report
mailing list