[Zope-Checkins] CVS: Releases/Zope/lib/python/TAL - TALInterpreter.py:1.81

Evan Simpson evan at 4-am.com
Wed Oct 1 13:28:11 EDT 2003


Update of /cvs-repository/Releases/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv12794/lib/python/TAL

Modified Files:
	TALInterpreter.py 
Log Message:
Completely fix bug #721 by using attrEscape instead of cgi.escape for
dynamic attribute values as well as static values.


=== Releases/Zope/lib/python/TAL/TALInterpreter.py 1.80 => 1.81 ===
--- Releases/Zope/lib/python/TAL/TALInterpreter.py:1.80	Fri Aug 15 09:58:38 2003
+++ Releases/Zope/lib/python/TAL/TALInterpreter.py	Wed Oct  1 13:27:40 2003
@@ -24,7 +24,7 @@
 from StringIO import StringIO
 from DocumentTemplate.DT_Util import ustr
 
-from TALDefs import TAL_VERSION, TALError, METALError
+from TALDefs import TAL_VERSION, TALError, METALError, attrEscape
 from TALDefs import isCurrentVersion, getProgramVersion, getProgramMode
 from TALGenerator import TALGenerator
 from TranslationContext import TranslationContext
@@ -336,7 +336,7 @@
         if value is None:
             value = name
         else:
-            value = '%s="%s"' % (name, escape(value, 1))
+            value = '%s="%s"' % (name, attrEscape(value))
         return 1, name, value
 
     def attrAction_tal(self, item):
@@ -369,7 +369,7 @@
                     value = translated
             if value is None:
                 value = name
-            value = '%s="%s"' % (name, escape(value, 1))
+            value = '%s="%s"' % (name, attrEscape(value))
         return ok, name, value
     bytecode_handlers["<attrAction>"] = attrAction
 




More information about the Zope-Checkins mailing list