This commit is contained in:
Looly 2024-01-25 15:57:27 +08:00
parent 694168a3cb
commit c5a1223803

View File

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