[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/widget.py Remove XXX, the code seems to do the right thing.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Jul 9 11:46:58 EDT 2004


Log message for revision 26349:

Remove XXX, the code seems to do the right thing.




-=-
Modified: Zope3/trunk/src/zope/app/form/browser/widget.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/widget.py	2004-07-09 15:46:56 UTC (rev 26348)
+++ Zope3/trunk/src/zope/app/form/browser/widget.py	2004-07-09 15:46:58 UTC (rev 26349)
@@ -404,7 +404,6 @@
             return self.context.default
 
 
-# XXX Note, some HTML quoting is needed in renderTag and renderElement.
 def renderTag(tag, **kw):
     """Render the tag. Well, not all of it, as we may want to / it."""
     attr_list = []
@@ -428,7 +427,7 @@
         cssWidgetType = u''
     if cssWidgetType or cssClass:
         names = filter(None, (cssClass, cssWidgetType))
-        attr_list.append(u'class="%s"' % ' '.join(names))
+        attr_list.append(u'class="%s"' %' '.join(names))
 
     if 'style' in kw:
         if kw['style'] != u'':
@@ -460,6 +459,7 @@
 
 def renderElement(tag, **kw):
     if 'contents' in kw:
+        # Do not quote contents, since it often contains generated HTML.
         contents = kw['contents']
         del kw['contents']
         return u"%s>%s</%s>" % (renderTag(tag, **kw), contents, tag)



More information about the Zope3-Checkins mailing list