]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Simplify code to remove an unnecessary test.
authorFred Drake <fdrake@acm.org>
Tue, 14 May 2002 15:50:11 +0000 (15:50 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 14 May 2002 15:50:11 +0000 (15:50 +0000)
Lib/HTMLParser.py

index bd6a885fcb2f7e92ff19fd7255b59de7c02e4ae4..908b30ebd03bbf6c595c050bb9546227a9d81010 100644 (file)
@@ -148,8 +148,6 @@ class HTMLParser(markupbase.ParserBase):
                     k = self.parse_starttag(i)
                 elif startswith("</", i):
                     k = self.parse_endtag(i)
-                    if k >= 0:
-                        self.clear_cdata_mode()
                 elif startswith("<!--", i):
                     k = self.parse_comment(i)
                 elif startswith("<?", i):
@@ -329,6 +327,7 @@ class HTMLParser(markupbase.ParserBase):
             self.error("bad end tag: %s" % `rawdata[i:j]`)
         tag = match.group(1)
         self.handle_endtag(tag.lower())
+        self.clear_cdata_mode()
         return j
 
     # Overridable -- finish processing of start+end tag: <tag.../>