[Erp5-report] r34963 jerome - /erp5/trunk/products/Formulator/Widget.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 3 19:24:42 CEST 2010
Author: jerome
Date: Mon May 3 19:24:39 2010
New Revision: 34963
URL: http://svn.erp5.org?rev=34963&view=rev
Log:
Always add a line break before field content.
Accoring to http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.1
"""SGML (see [ISO8879], section 7.6.1) specifies that a line break immediately
following a start tag must be ignored"""
Before this change, a field such as a textarea displaying a value starting by \n was
discarding this \n . This fixes the new test in 34962
Modified:
erp5/trunk/products/Formulator/Widget.py
Modified: erp5/trunk/products/Formulator/Widget.py
URL: http://svn.erp5.org/erp5/trunk/products/Formulator/Widget.py?rev=34963&r1=34962&r2=34963&view=diff
==============================================================================
--- erp5/trunk/products/Formulator/Widget.py [utf8] (original)
+++ erp5/trunk/products/Formulator/Widget.py [utf8] Mon May 3 19:24:39 2010
@@ -1539,7 +1539,7 @@
if kw.has_key('contents'):
contents = kw['contents']
del kw['contents']
- return "%s>%s</%s>" % (apply(render_tag, (tag, ), kw), contents, tag)
+ return "%s>\n%s</%s>" % (apply(render_tag, (tag, ), kw), contents, tag)
else:
return apply(render_tag, (tag, ), kw) + " />"
More information about the Erp5-report
mailing list