|
From: <sub...@co...> - 2006-01-24 18:27:09
|
Author: test
Date: 2006-01-24 11:26:55 -0700 (Tue, 24 Jan 2006)
New Revision: 1535
Modified:
FormEncode/trunk/formencode/htmlfill.py
Log:
Pass unicode through html_quote without str()ifying it
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2006-01-23 15:35:50 UTC (rev 1534)
+++ FormEncode/trunk/formencode/htmlfill.py 2006-01-24 18:26:55 UTC (rev 1535)
@@ -97,7 +97,10 @@
return ''
elif hasattr(v, '__html__'):
return v.__html__()
+ elif isinstance(v, basestring):
+ return cgi.escape(v, 1)
else:
+ # @@: Should this be unicode(v) or str(v)?
return cgi.escape(str(v), 1)
def default_formatter(error):
|