Skip to content

Commit f3820f9

Browse files
committed
Fix InTableText mode
1 parent 1deae80 commit f3820f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/html5lib/html5parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,9 @@ def processEOF(self):
15821582
#Stop parsing
15831583

15841584
def processSpaceCharacters(self, token):
1585+
originalPhase = self.parser.phase
15851586
self.parser.phase = self.parser.phases["inTableText"]
1586-
self.parser.phase.originalPhase = self
1587+
self.parser.phase.originalPhase = originalPhase
15871588
self.parser.phase.characterTokens.append(token)
15881589

15891590
def processCharacters(self, token):
@@ -1704,7 +1705,8 @@ def processCharacters(self, token):
17041705

17051706
def processSpaceCharacters(self, token):
17061707
#pretty sure we should never reach here
1707-
assert False
1708+
self.characterTokens.append(token)
1709+
# assert False
17081710

17091711
def processStartTag(self, token):
17101712
self.flushCharacters()

0 commit comments

Comments
 (0)