[Zpt] CVS: Packages/TAL - TALInterpreter.py:1.18

guido@digicool.com guido@digicool.com
Fri, 16 Mar 2001 07:18:10 -0500 (EST)


Update of /cvs-repository/Packages/TAL
In directory korak:/tmp/cvs-serv19192

Modified Files:
	TALInterpreter.py 
Log Message:
Move quote() to TALDefs.



--- Updated File TALInterpreter.py in package Packages/TAL --
--- TALInterpreter.py	2001/03/15 22:07:08	1.17
+++ TALInterpreter.py	2001/03/16 12:18:10	1.18
@@ -90,7 +90,9 @@
 import string
 import getopt
 import cgi
+
 from XMLParser import XMLParser
+from TALDefs import quote
 
 BOOLEAN_HTML_ATTRS = [
     # List of Boolean attributes in HTML that should be rendered in
@@ -297,12 +299,6 @@
             self.interpret(compiledSlot)
         else:
             self.interpret(block)
-
-def quote(s):
-    if '"' in s and "'" not in s:
-        return "'%s'" % cgi.escape(s)
-    else:
-        return '"%s"' % cgi.escape(s, 1)
 
 def test():
     from driver import FILE, parsefile