[formrenderers] if a tag object gets there, it blows (closes #2410462)
- cwtags monkeypatches cubicweb's UStringIO's .write and .getvalue methods
- but it cannot monkeypatch list.append ...
--- a/web/views/formrenderers.py Thu Jun 14 15:21:12 2012 +0200
+++ b/web/views/formrenderers.py Wed Jun 27 18:10:59 2012 +0200
@@ -117,7 +117,9 @@
errormsg = self.error_message(form)
if errormsg:
data.insert(0, errormsg)
- w(''.join(data))
+ # NOTE: we call unicode because `tag` objects may be found within data
+ # e.g. from the cwtags library
+ w(''.join(unicode(x) for x in data))
def render_content(self, w, form, values):
if self.display_progress_div: