@@ -306,7 +306,7 @@ def rcdataState(self):
306
306
# have already been appended to lastFourChars and will have broken
307
307
# any <!-- or --> sequences
308
308
else :
309
- chars = self .stream .charsUntil (("&" , "<" ))
309
+ chars = self .stream .charsUntil (("&" , "<" , u" \u0000 " ))
310
310
self .tokenQueue .append ({"type" : tokenTypes ["Characters" ], "data" :
311
311
data + chars })
312
312
return True
@@ -1016,7 +1016,7 @@ def attributeValueDoubleQuotedState(self):
1016
1016
self .state = self .dataState
1017
1017
else :
1018
1018
self .currentToken ["data" ][- 1 ][1 ] += data + \
1019
- self .stream .charsUntil (("\" " , "&" ))
1019
+ self .stream .charsUntil (("\" " , "&" , u" \u0000 " ))
1020
1020
return True
1021
1021
1022
1022
def attributeValueSingleQuotedState (self ):
@@ -1035,7 +1035,7 @@ def attributeValueSingleQuotedState(self):
1035
1035
self .state = self .dataState
1036
1036
else :
1037
1037
self .currentToken ["data" ][- 1 ][1 ] += data + \
1038
- self .stream .charsUntil (("'" , "&" ))
1038
+ self .stream .charsUntil (("'" , "&" , u" \u0000 " ))
1039
1039
return True
1040
1040
1041
1041
def attributeValueUnQuotedState (self ):
@@ -1060,7 +1060,7 @@ def attributeValueUnQuotedState(self):
1060
1060
self .state = self .dataState
1061
1061
else :
1062
1062
self .currentToken ["data" ][- 1 ][1 ] += data + self .stream .charsUntil (
1063
- frozenset (("&" , ">" , '"' , "'" , "=" , "<" , "`" )) | spaceCharacters )
1063
+ frozenset (("&" , ">" , '"' , "'" , "=" , "<" , "`" , " \u0000 " )) | spaceCharacters )
1064
1064
return True
1065
1065
1066
1066
def afterAttributeValueState (self ):
0 commit comments