Skip to content

Commit e8af2aa

Browse files
author
James Graham
committed
Complete null handling changes
1 parent 520a96c commit e8af2aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

html5lib/html5parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ def processCharacters(self, token):
23822382
return new_token
23832383
elif token["data"] == u"\u0000":
23842384
token["data"] = u"\uFFFD"
2385-
elif (not self.parser.framesetOK and
2385+
elif (self.parser.framesetOK and
23862386
any(char not in spaceCharacters for char in token["data"])):
23872387
self.parser.framesetOK = False
23882388
Phase.processCharacters(self, token)

html5lib/tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def plaintextState(self):
375375
else:
376376
self.tokenQueue.append({"type": tokenTypes["Characters"], "data":
377377
data + self.stream.charsUntil(u"\u0000")})
378-
return True
378+
return True
379379

380380
def tagOpenState(self):
381381
data = self.stream.char()

0 commit comments

Comments
 (0)