[Erp5-report] r34149 nicolas - /erp5/trunk/products/ERP5/Document/Document.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Mar 26 14:15:13 CET 2010


Author: nicolas
Date: Fri Mar 26 14:15:12 2010
New Revision: 34149

URL: http://svn.erp5.org?rev=34149&view=rev
Log:
Self-Close <base /> element
replace only first occurrence of <head>


Modified:
    erp5/trunk/products/ERP5/Document/Document.py

Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=34149&r1=34148&r2=34149&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Document.py [utf8] Fri Mar 26 14:15:12 2010
@@ -1138,8 +1138,8 @@
       # if base is defined yet.
       html = str(html)
       if not html.find('<base') >= 0:
-        base = '<base href="%s">' % self.getContentBaseURL()
-        html = html.replace('<head>', '<head>%s' % base)
+        base = '<base href="%s"/>' % self.getContentBaseURL()
+        html = html.replace('<head>', '<head>%s' % base, 1)
       self.setConversion(html, mime='text/html', format='base-html')
     return html
 




More information about the Erp5-report mailing list