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

In handle_data(), use emitRawText() instead of emitText(), so that

<script> and <style> elements aren't mangled.

By nature of the parser, bare < and & cannot occur in the input data
(the parser raises an exception when it encounters these); bare > is
harmless.
parent 42c78df3
......@@ -276,7 +276,7 @@ class HTMLTALParser(HTMLParser):
self.gen.emitRawText("&%s;" % name)
def handle_data(self, data):
self.gen.emitText(data)
self.gen.emitRawText(data)
def handle_comment(self, data):
self.gen.emitRawText("<!--%s-->" % data)
......
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