Commit adbcd6d5 authored by Fred Drake's avatar Fred Drake

clean up imports to reduce differences with the Zope 3 version

parent 4c439783
...@@ -17,9 +17,7 @@ $Id$ ...@@ -17,9 +17,7 @@ $Id$
""" """
import cgi import cgi
import sys import sys
import getopt
import re import re
from cgi import escape
# Do not use cStringIO here! It's not unicode aware. :( # Do not use cStringIO here! It's not unicode aware. :(
from StringIO import StringIO from StringIO import StringIO
...@@ -392,7 +390,7 @@ class TALInterpreter: ...@@ -392,7 +390,7 @@ class TALInterpreter:
elif evalue is self.Default: elif evalue is self.Default:
value = attrEscape(value) value = attrEscape(value)
else: else:
value = escape(value, quote=1) value = cgi.escape(value, quote=1)
value = '%s="%s"' % (name, value) value = '%s="%s"' % (name, value)
return ok, name, value return ok, name, value
bytecode_handlers["<attrAction>"] = attrAction bytecode_handlers["<attrAction>"] = attrAction
...@@ -507,7 +505,7 @@ class TALInterpreter: ...@@ -507,7 +505,7 @@ class TALInterpreter:
if isinstance(text, MessageID): if isinstance(text, MessageID):
# Translate this now. # Translate this now.
text = self.engine.translate(text.domain, text, text.mapping) text = self.engine.translate(text.domain, text, text.mapping)
s = escape(text) s = cgi.escape(text)
self._stream_write(s) self._stream_write(s)
i = s.rfind('\n') i = s.rfind('\n')
if i < 0: if i < 0:
......
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