Commit edf5ff68 authored by Guido van Rossum's avatar Guido van Rossum

Move quote() to TALDefs.

parent 0f58fc15
...@@ -90,7 +90,9 @@ import sys ...@@ -90,7 +90,9 @@ import sys
import string import string
import getopt import getopt
import cgi import cgi
from XMLParser import XMLParser from XMLParser import XMLParser
from TALDefs import quote
BOOLEAN_HTML_ATTRS = [ BOOLEAN_HTML_ATTRS = [
# List of Boolean attributes in HTML that should be rendered in # List of Boolean attributes in HTML that should be rendered in
...@@ -298,12 +300,6 @@ class TALInterpreter: ...@@ -298,12 +300,6 @@ class TALInterpreter:
else: else:
self.interpret(block) 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(): def test():
from driver import FILE, parsefile from driver import FILE, parsefile
from DummyEngine import DummyEngine from DummyEngine import DummyEngine
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment