Here's my local test for this but possibly the tests already in MalformedHtmlTest cover this situation because applying this fix reduced the number of errors by MalformedHtmlTest
Input:
<html> <body> <table> <form></form> <tbody> <tr> </tr> </tbody> <form></form> <script></script> </table> <table> <form></form> <tr> </tr> <form></form> <script></script> </table> </body> </html>
Expected:
"String[] expected = {
"",
" ",
"