quixote/form form.ptl,1.2,1.3

Greg Ward <gward-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]>
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Update of /home/cvs/quixote/form
In directory hewson:/tmp/cvs-serv724

Modified Files:
	form.ptl 
Log Message:
In _render_error(), use nl2br() to make multi-line error messages look
right in the output.


Index: form.ptl
===================================================================
RCS file: /home/cvs/quixote/form/form.ptl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- form.ptl	23 Oct 2002 20:25:42 -0000	1.2
+++ form.ptl	29 Oct 2002 16:17:59 -0000	1.3
@@ -8,7 +8,7 @@
 
 from types import StringType
 from quixote import get_session, get_publisher
-from quixote.html import url_quote, htmltag, htmltext
+from quixote.html import url_quote, htmltag, htmltext, nl2br
 from quixote.form.widget import FormValueError, HiddenWidget
 
 
@@ -157,7 +157,7 @@
 
     def _render_error [html] (self, error):
         if error:
-            '<font color="red">' + error + '</font><br />\n'
+            '<font color="red">' + nl2br(error) + '</font><br />\n'
 
     def _render_hint [html] (self, hint):
         if hint:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.