This commit is contained in:
Looly 2024-01-25 15:57:21 +08:00
parent 22081e879a
commit fc762d9872

View File

@ -0,0 +1,19 @@
package cn.hutool.http;
import org.junit.Assert;
import org.junit.Test;
public class IssueI8YV0KTest {
@Test
public void removeHtmlAttrTest(){
final String str = "<content styleCode=\"xmChange yes\">";
Assert.assertEquals("<content>", HtmlUtil.removeHtmlAttr(str, "styleCode"));
}
@Test
public void removeHtmlAttrTest2(){
final String str = "<content styleCode=\"xmChange\"/>";
Assert.assertEquals("<content/>", HtmlUtil.removeHtmlAttr(str, "styleCode"));
}
}