Commit 0f19c8bd authored by Jérome Perrin's avatar Jérome Perrin

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


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34963 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0ae69d38
......@@ -1539,7 +1539,7 @@ def render_element(tag, **kw):
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) + " />"
......
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