修复HtmlUtil.removeHtmlAttr处理空格问题

This commit is contained in:
Looly
2024-01-25 18:01:25 +08:00
parent fc762d9872
commit e4dffeb4c8
3 changed files with 16 additions and 7 deletions

View File

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