> Workaround:
>
> edit form.py
> line 33: out += "<td>"+i.pre+i.render()+i.post+"</td>"
> change to:
> line 33: out += "<td>"+i.pre+i.render().decode('utf-8')+i.post+"</td>"
I think, the problem is not there. Problem is in adding the
description, which not websafe'd. The same problem may come, if you
have unicode error messages.
Here is the fix.
file 'web/form.py'
--- web/form.py 2007-06-21 00:58:41 +0000
+++ web/form.py 2008-01-06 01:18:31 +0000
@@ -29,14 +29,14 @@
out += self.rendernote(self.note)
out += '<table>\n'
for i in self.inputs:
- out += ' <tr><th><label for="%s">%s</label></th>' %
(i.id, i.description)
+ out += ' <tr><th><label for="%s">%s</label></th>' %
(i.id, net.websafe(i.description))
out += "<td>"+i.pre+i.render()+i.post+"</td>"
out += '<td id="note_%s">%s</td></tr>\n' % (i.id,
self.rendernote(i.note))
out += "</table>"
return out
> Workaround: i.pre+i. render( )+i.post+ "</td>" i.pre+i. render( ).decode( 'utf-8' )+i.post+ "</td>"
>
> edit form.py
> line 33: out += "<td>"+
> change to:
> line 33: out += "<td>"+
I think, the problem is not there. Problem is in adding the
description, which not websafe'd. The same problem may come, if you
have unicode error messages.
Here is the fix.
file 'web/form.py' (self.note) >%s</label> </th>' % >%s</label> </th>' % i.description) ) i.pre+i. render( )+i.post+ "</td>" %s">%s< /td></tr> \n' % (i.id, (i.note) )
--- web/form.py 2007-06-21 00:58:41 +0000
+++ web/form.py 2008-01-06 01:18:31 +0000
@@ -29,14 +29,14 @@
out += self.rendernote
out += '<table>\n'
for i in self.inputs:
- out += ' <tr><th><label for="%s"
(i.id, i.description)
+ out += ' <tr><th><label for="%s"
(i.id, net.websafe(
out += "<td>"+
out += '<td id="note_
self.rendernote
out += "</table>"
return out
def rendernote(self, note): wrong"> %s</strong> ' % note wrong"> %s</strong> ' % web.netsafe(note)
- if note: return '<strong class="
+ if note: return '<strong class="
else: return ""
def validates(self, source=None, _validate=True, **kw):