From ab02e8dd53f062573bb2f4bfb71c1513fc6f3b4c Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Fri, 24 May 2024 09:35:00 +0200 Subject: [PATCH] test case for https://github.com/nahsra/antisamy/issues/453 --- .../html/parser/MalformedHtmlTest.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java b/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java index cb3ef1a8337..1066b9e3748 100644 --- a/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java +++ b/src/test/java/org/htmlunit/html/parser/MalformedHtmlTest.java @@ -1419,4 +1419,27 @@ public void incompleteEntities() throws Exception { assertEquals(getExpectedAlerts()[0], getMockWebConnection().getLastWebRequest().getUrl()); } + + /** + * @throws Exception if the test fails + */ + @Test + @Alerts({"5", "3", "[object HTMLSelectElement]", "[object HTMLTableElement]", "[object HTMLScriptElement]"}) + public void selectInsideEmptyTable() throws Exception { + final String html = "\n" + + "
\n" + + "\n" + + ""; + + expandExpectedAlertsVariables(URL_FIRST); + + loadPageVerifyTitle2(html); + } }