Commit 59b09255 authored by Fred Drake's avatar Fred Drake

Simplify code to allow multiple "false" end tags in CDATA content.

parent faa28298
...@@ -157,8 +157,6 @@ class HTMLParser(markupbase.ParserBase): ...@@ -157,8 +157,6 @@ class HTMLParser(markupbase.ParserBase):
k = self.parse_starttag(i) k = self.parse_starttag(i)
elif endtagopen.match(rawdata, i): # </ elif endtagopen.match(rawdata, i): # </
k = self.parse_endtag(i) k = self.parse_endtag(i)
if k >= 0:
self.clear_cdata_mode()
elif _contains_at(rawdata, "<!--", i): # <!-- elif _contains_at(rawdata, "<!--", i): # <!--
k = self.parse_comment(i) k = self.parse_comment(i)
elif _contains_at(rawdata, "<!", i): # <! elif _contains_at(rawdata, "<!", i): # <!
...@@ -349,6 +347,7 @@ class HTMLParser(markupbase.ParserBase): ...@@ -349,6 +347,7 @@ class HTMLParser(markupbase.ParserBase):
self.handle_data(match.group(0)) self.handle_data(match.group(0))
else: else:
self.handle_endtag(tag) self.handle_endtag(tag)
self.clear_cdata_mode()
return j return j
# Overridable -- finish processing of start+end tag: <tag.../> # Overridable -- finish processing of start+end tag: <tag.../>
......
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