Skip to content

Commit 33cb109

Browse files
committed
Fix problem with unclosed scoping element and end tag html
1 parent b0bec7d commit 33cb109

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/html5lib/html5parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,8 +1274,9 @@ def endTagBody(self, token):
12741274
self.parser.phase = self.parser.phases["afterBody"]
12751275

12761276
def endTagHtml(self, token):
1277-
self.endTagBody(impliedTagToken("body"))
1278-
if not self.parser.innerHTML:
1277+
#We repeat the test for the body end tag token being ignored here
1278+
if self.tree.elementInScope("body"):
1279+
self.endTagBody(impliedTagToken("body"))
12791280
self.parser.phase.processEndTag(token)
12801281

12811282
def endTagBlock(self, token):

0 commit comments

Comments
 (0)