[CMF-checkins] SVN: CMF/trunk/C - fixed html_marshal
Yvo Schubbe
y.2006_ at wcm-solutions.de
Mon Jan 30 12:03:34 EST 2006
Log message for revision 41498:
- fixed html_marshal
Changed:
U CMF/trunk/CHANGES.txt
U CMF/trunk/CMFDefault/tests/test_utils.py
U CMF/trunk/CMFDefault/utils.py
-=-
Modified: CMF/trunk/CHANGES.txt
===================================================================
--- CMF/trunk/CHANGES.txt 2006-01-30 16:31:04 UTC (rev 41497)
+++ CMF/trunk/CHANGES.txt 2006-01-30 17:03:33 UTC (rev 41498)
@@ -128,6 +128,10 @@
Bug Fixes
+ - CMFDefault utils: Fixed html_marshal function.
+ The return values are no longer escaped to avoid double quoting and no
+ longer stringified. The page templates take care of these steps.
+
- PortalFolder: Synced _verifyObjectPaste code with OFS.CopySupport.
The behavior is almost the same as before, but the code is less tolerant
if content types are not registered properly.
Modified: CMF/trunk/CMFDefault/tests/test_utils.py
===================================================================
--- CMF/trunk/CMFDefault/tests/test_utils.py 2006-01-30 16:31:04 UTC (rev 41497)
+++ CMF/trunk/CMFDefault/tests/test_utils.py 2006-01-30 17:03:33 UTC (rev 41498)
@@ -190,9 +190,9 @@
def test_html_marshal(self):
from Products.CMFDefault.utils import html_marshal
- self.assertEqual( html_marshal(foo=1), ( ('foo:int', '1'), ) )
+ self.assertEqual( html_marshal(foo=1), ( ('foo:int', 1), ) )
self.assertEqual( html_marshal(foo=1, bar='baz >&baz'),
- ( ('foo:int', '1'), ('bar', 'baz >&baz') ) )
+ ( ('foo:int', 1), ('bar', 'baz >&baz') ) )
def test_toUnicode(self):
from Products.CMFDefault.utils import toUnicode
Modified: CMF/trunk/CMFDefault/utils.py
===================================================================
--- CMF/trunk/CMFDefault/utils.py 2006-01-30 16:31:04 UTC (rev 41497)
+++ CMF/trunk/CMFDefault/utils.py 2006-01-30 17:03:33 UTC (rev 41498)
@@ -406,9 +406,8 @@
def html_marshal(**kw):
""" Marshal variables for html forms.
"""
- vars = []
- for key, converter, value in complex_marshal( kw.items() ):
- vars.append( ( key + converter, escape( str(value) ) ) )
+ vars = [ (key + converter, value)
+ for key, converter, value in complex_marshal(kw.items()) ]
return tuple(vars)
security.declarePublic('toUnicode')
More information about the CMF-checkins
mailing list