[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - TALES.py:1.2.2.1
Stephan Richter
srichter@cbu.edu
Fri, 14 Jun 2002 10:49:02 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv20580/lib/python/Zope/PageTemplate
Modified Files:
Tag: srichter-z3-unicode-branch
TALES.py
Log Message:
Branch-specifc commit, so that Barry and Fred can help me debug the existing
errors.
=== Zope3/lib/python/Zope/PageTemplate/TALES.py 1.2 => 1.2.2.1 ===
import re
import sys
-from types import StringType
+from types import StringType, StringTypes
import Zope.ZTUtils
from SafeMapping import SafeMapping
@@ -229,7 +229,9 @@
text = self.evaluate(expr)
if text is _default or text is None:
return text
- return str(text)
+ if type(text) not in StringTypes:
+ text = unicode(text)
+ return text
def evaluateStructure(self, expr):
return self.evaluate(expr)