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

Refactor the commonality between do_startTag and do_startEndTag.

Remove the do_text() method, this instruction is no longer used.
parent 1bee590e
......@@ -169,9 +169,12 @@ class TALInterpreter:
self.do_startTag(name, attrList)
self.do_endTag(name)
else:
self.do_startTag(name, attrList, self.endsep)
self.startTagCommon(name, attrList, self.endsep)
def do_startTag(self, name, attrList, end=">"):
def do_startTag(self, name, attrList):
self.startTagCommon(name, attrList, ">")
def startTagCommon(self, name, attrList, end):
if not attrList:
self.stream_write("<%s%s" % (name, end))
return
......@@ -260,10 +263,6 @@ class TALInterpreter:
while iterator.next():
self.interpret(block)
def do_text(self, text):
text = cgi.escape(text)
self.stream_write(text)
def do_rawtext(self, text):
self.stream_write(text)
......
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