File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/test/java/org/owasp/html Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -101,4 +101,13 @@ public static final void testTextAllowedInLinks() {
101101 "<a href=\" ../good.html\" rel=\" nofollow\" >click here</a>" ,
102102 sanitized );
103103 }
104+
105+ @ Test
106+ public static final void testTableStructure () {
107+ String input = "<TABLE><TR><TD>Green Zone Bulk mail<TD>21 entries<TR><TH>Type<TH>Date<TH>Size<TH>Country<TR><TD>Junk<TD>March 26<TD>25KB<TD>US" ;
108+ String sanitized = Sanitizers .TABLES .sanitize (input );
109+ assertEquals (
110+ "<table><tbody><tr><td>Green Zone Bulk mail</td><td>21 entries</td></tr><tr><th>Type</th><th>Date</th><th>Size</th><th>Country</th></tr><tr><td>Junk</td><td>March 26</td><td>25KB</td><td>US</td></tr></tbody></table>" ,
111+ sanitized );
112+ }
104113}
You can’t perform that action at this time.
0 commit comments