8000 Fix handling of source/param within "in body". Fixes #115. · html5lib/html5lib-python@e90e6da · GitHub
[go: up one dir, main page]

Skip to content

Commit e90e6da

Browse files
committed
Fix handling of source/param within "in body". Fixes #115.
1 parent 0cb080a commit e90e6da

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/html5lib/html5parser.py

Lines changed: 7 additions & 1 deletion

0 commit comments

Comments
 (0)
0
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,8 @@ def __init__(self, parser, tree):
880880
("xmp", self.startTagXmp),
881881
("table", self.startTagTable),
882882
(("area", "basefont", "bgsound", "br", "embed", "img", "input",
883-
"keygen", "param", "spacer", "wbr"), self.startTagVoidFormatting),
883+
"keygen", "spacer", "wbr"), self.startTagVoidFormatting),
884+
(("param", "source"), self.startTagParamSource),
884885
("hr", self.startTagHr),
885886
("image", self.startTagImage),
886887
("isindex", self.startTagIsIndex),
@@ -1116,6 +1117,11 @@ def startTagVoidFormatting(self, token):
11161117
token["selfClosingAcknowledged"] = True
11171118
self.parser.framesetOK = False
11181119

1120+
def startTagParamSource(self, token):
1121+
self.tree.insertElement(token)
1122+
self.tree.openElements.pop()
1123+
token["selfClosingAcknowledged"] = True
1124+
11191125
def startTagHr(self, token):
11201126
if self.tree.elementInScope("p"):
11211127
self.endTagP(impliedTagToken("p"))