1.1 --- a/examples/Common/Form/__init__.py Fri Aug 26 18:11:48 2005 +0000
1.2 +++ b/examples/Common/Form/__init__.py Fri Aug 26 18:12:13 2005 +0000
1.3 @@ -132,8 +132,12 @@
1.4 def _format_list(self, l):
1.5 l2 = []
1.6 for value in l:
1.7 - if type(value) == type(""):
1.8 - value = repr(value)
1.9 +
1.10 + # Detect uploads.
1.11 +
1.12 + if type(value) not in (type(""), type(u"")):
1.13 + value = "%s: %s" % (value.headers.get("content-type") or "No content type", repr(str(value)))
1.14 +
1.15 l2.append("<li>%s</li>" % (value.replace("&", "&").replace("<", "<").replace(">", ">") or "<em>empty</em>"))
1.16 return "".join(l2)
1.17