修复HtmlUtil.removeHtmlAttr处理空格问题

This commit is contained in:
Looly
2024-01-25 18:01:31 +08:00
parent c5a1223803
commit 40f2bcab15
2 changed files with 13 additions and 5 deletions

View File

@@ -15,4 +15,10 @@ public class IssueI8YV0KTest {
final String str = "<content styleCode=\"xmChange\"/>";
Assertions.assertEquals("<content/>", HtmlUtil.removeHtmlAttr(str, "styleCode"));
}
@Test
public void removeHtmlAttrTest3(){
final String str = "<content styleCode=\"dada ada\" data=\"dsad\" >";
Assertions.assertEquals("<content data=\"dsad\">", HtmlUtil.removeHtmlAttr(str, "styleCode"));
}
}