8000 Update to remove infinite loop in fragment case. · html5lib/html5lib-python@4699f40 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 4699f40

Browse files
committed
Update to remove infinite loop in fragment case.
1 parent d6c0d58 commit 4699f40

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
@@ -2176,8 +2176,9 @@ def startTagSelect(self, token):
21762176

21772177
def startTagInput(self, token):
21782178
self.parser.parseError("unexpected-input-in-select")
2179-
self.endTagSelect("select")
2180-
self.parser.phase.processStartTag(token)
2179+
if self.tree.elementInScope("select", True):
2180+
self.endTagSelect("select")
2181+
self.parser.phase.processStartTag(token)
21812182

21822183
def startTagOther(self, token):
21832184
self.parser.parseError("unexpected-start-tag-in-select",

0 commit comments

Comments
 (0)
0