Make sure the PlainTextWidget converts linebreaks to proper HTML.
authorLennard de Rijk <ljvderijk@gmail.com>
Tue, 25 Aug 2009 15:28:50 +0200
changeset 2797 236e5b192295
parent 2796 b9eda6e53c9f
child 2798 ec1857f0d0c7
Make sure the PlainTextWidget converts linebreaks to proper HTML.
app/soc/views/helper/widgets.py
--- a/app/soc/views/helper/widgets.py	Tue Aug 25 11:43:36 2009 +0200
+++ b/app/soc/views/helper/widgets.py	Tue Aug 25 15:28:50 2009 +0200
@@ -20,6 +20,7 @@
 __authors__ = [
   '"Pawel Solyga" <pawel.solyga@gmail.com>',
   '"Sverre Rabbelier" <sverre@rabbelier.nl>',
+  '"Lennard de Rijk" <ljvderijk@gmail.com>',
   ]
 
 
@@ -57,7 +58,7 @@
     """Render ReadOnlyInput widget as HTML.
     """
 
-    return str(value) if value else ""
+    return html.linebreaks(str(value)) if value else ""
 
 
 class FullTinyMCE(forms.widgets.Textarea):