[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate - DT_Var.py:1.57.6.3
Matthew T. Kromer
matt@zope.com
Fri, 20 Sep 2002 15:52:55 -0400
Update of /cvs-repository/Zope/lib/python/DocumentTemplate
In directory cvs.zope.org:/tmp/cvs-serv9625/lib/python/DocumentTemplate
Modified Files:
Tag: Zope-2_6-branch
DT_Var.py
Log Message:
Reapply str->ustr conversions, since they were held harmless by testing
=== Zope/lib/python/DocumentTemplate/DT_Var.py 1.57.6.2 => 1.57.6.3 ===
--- Zope/lib/python/DocumentTemplate/DT_Var.py:1.57.6.2 Fri Sep 20 15:13:56 2002
+++ Zope/lib/python/DocumentTemplate/DT_Var.py Fri Sep 20 15:52:25 2002
@@ -284,7 +284,7 @@
if fmt=='s':
# Keep tainted strings as tainted strings here.
if not isinstance(val, TaintedString):
- val=str(val)
+ val=ustr(val)
else:
# Keep tainted strings as tainted strings here.
wastainted = 0
@@ -350,7 +350,7 @@
# Unsafe data is explicitly quoted here; we don't expect this to be HTML
# quoted later on anyway.
if isinstance(v, TaintedString): v = v.quoted()
- v=str(v)
+ v=ustr(v)
if v.find('\r') >= 0: v=''.join(v.split('\r'))
if v.find('\n') >= 0: v='<br />\n'.join(v.split('\n'))
return v