Bugfix while displaying content of textarea-entered text (Strings with format=String.TEXT): for displaying again textarea content, I replaced 'backslash n' with html br tags, but in some cases carriage returns are stored as a sequence of 'backslah r' and 'backslah n' chars. In this case, 'backslash r' chars were left alone in the HTML page, producing sometimes strange behaviour within the browser.

This commit is contained in:
Gaetan Delannay 2011-02-23 11:30:44 +01:00
parent 3fc5bc8418
commit 39321b2d38
5 changed files with 25 additions and 12 deletions

View file

@ -378,7 +378,7 @@ class AbstractWrapper:
self.o.reindexObject()
def export(self, at='string', format='xml', include=None, exclude=None):
'''Creates an "exportable" version of this object. p_format is XML by
'''Creates an "exportable" version of this object. p_format is "xml" by
default, but can also be "csv". If p_format is:
* "xml", if p_at is "string", this method returns the XML version,
without the XML prologue. Else, (a) if not p_at, the XML
@ -427,4 +427,9 @@ class AbstractWrapper:
p_data must be a dictionary whose keys are field names (strings) and
whose values are the previous field values.'''
self.o.addDataChange(data)
def formatText(self, text, format='html'):
'''Produces a representation of p_text into the desired p_format, which
is 'html' by default.'''
return self.o.formatText(text, format)
# ------------------------------------------------------------------------------