Author: eallen
Date: 2008-09-04 11:47:09 -0400 (Thu, 04 Sep 2008)
New Revision: 2413
Modified:
mgmt/trunk/cumin/python/wooly/widgets.py
Log:
Inspect optional 3rd element when displaying properties to determine if value needs to be
escaped.
Modified: mgmt/trunk/cumin/python/wooly/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/wooly/widgets.py 2008-09-04 15:45:54 UTC (rev 2412)
+++ mgmt/trunk/cumin/python/wooly/widgets.py 2008-09-04 15:47:09 UTC (rev 2413)
@@ -417,8 +417,12 @@
def render_value(self, session, prop):
value = prop[1]
+ try:
+ escapable = prop[2]
+ except IndexError:
+ escapable = True
- if type(value) is str:
+ if type(value) is str and escapable:
value = escape(value)
elif value is None:
value = "<em>None</em>"
Show replies by date