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

Move quote() to TALDefs.

parent 0f58fc15
......@@ -90,7 +90,9 @@ import sys
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
......@@ -298,12 +300,6 @@ class TALInterpreter:
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
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