@@ -1609,15 +1609,6 @@ def clearStackToTableContext(self):
16091609self .tree .openElements .pop ()
16101610# When the current node is <html> it's an innerHTML case
16111611
1612- def getCurrentTable (self ):
1613- i = - 1
1614- while - i <= len (self .tree .openElements )and self .tree .openElements [i ].name != "table" :
1615- i -= 1
1616- if - i > len (self .tree .openElements ):
1617- return self .tree .openElements [0 ]
1618- else :
1619- return self .tree .openElements [i ]
1620-
16211612# processing methods
16221613def processEOF (self ):
16231614if self .tree .openElements [- 1 ].name != "html" :
@@ -1690,8 +1681,6 @@ def startTagForm(self, token):
16901681
16911682def startTagOther (self ,token ):
16921683self .parser .parseError ("unexpected-start-tag-implies-table-voodoo" , {"name" :token ["name" ]})
1693- if "tainted" not in self .getCurrentTable ()._flags :
1694- self .getCurrentTable ()._flags .append ("tainted" )
16951684# Do the table magic!
16961685self .tree .insertFromTable = True
16971686self .parser .phases ["inBody" ].processStartTag (token )
@@ -1718,8 +1707,6 @@ def endTagIgnore(self, token):
17181707
17191708def endTagOther (self ,token ):
17201709self .parser .parseError ("unexpected-end-tag-implies-table-voodoo" , {"name" :token ["name" ]})
1721- if "tainted" not in self .getCurrentTable ()._flags :
1722- self .getCurrentTable ()._flags .append ("tainted" )
17231710# Do the table magic!
17241711self .tree .insertFromTable = True
17251712self .parser .phases ["inBody" ].processEndTag (token )