File tree 2 files changed +19
-2
lines changed
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2022,6 +2022,21 @@ def endTagOther(self, token):
2022
2022
self .parser .phases ["inSelect" ].processEndTag (token )
2023
2023
2024
2024
2025
+ class InForeignContentPhase (Phase ):
2026
+ def __init__ (self , parser , tree ):
2027
+ Phase .__init__ (self , parser , tree )
2028
+ self .secondardInsertionMode = None
2029
+
2030
+ def processStartTag (self , token ):
2031
+
2032
+ self .startTagHandler = utils .MethodDispatcher ([
2033
+ ("html" , self .startTagHtml )
2034
+ ])
2035
+ self .startTagHandler .default = self .startTagOther
2036
+
2037
+ self .endTagHandler = utils .MethodDispatcher ([("html" , self .endTagHtml )])
2038
+ self .endTagHandler .default = self .endTagOther
2039
+
2025
2040
class AfterBodyPhase (Phase ):
2026
2041
def __init__ (self , parser , tree ):
2027
2042
Phase .__init__ (self , parser , tree )
Original file line number Diff line number Diff line change @@ -364,7 +364,8 @@ def tagOpenState(self):
364
364
elif data in asciiLetters :
365
365
self .currentToken = {"type" : tokenTypes ["StartTag" ],
366
366
"name" : data , "data" : [],
367
- "selfClosing" : False }
367
+ "selfClosing" : False ,
368
+ "selfClosingAcknowledged" : False }
368
369
self .state = self .states ["tagName" ]
369
370
elif data == u">" :
370
371
# XXX In theory it could be something besides a tag name. But
@@ -761,7 +762,8 @@ def markupDeclarationOpenState(self):
761
762
# so they can be copied directly into the bogus comment data, and only
762
763
# the last character might be '>' or EOF and needs to be ungetted
763
764
self .stream .unget (charStack .pop ())
764
- self .currentToken = {"type" : tokenTypes ["Comment" ], "data" : u"" .join (charStack )}
765
+ self .currentToken = {"type" : tokenTypes ["Comment" ],
766
+ "data" : u"" .join (charStack )}
765
767
self .state = self .states ["bogusCommentContinuation" ]
766
768
return True
767
769
You can’t perform that action at this time.
0 commit comments