mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
commit
4899e03a48
@ -18,6 +18,7 @@ public class Html4Escape extends ReplacerChain {
|
||||
{ "&", "&" }, // & - ampersand
|
||||
{ "<", "<" }, // < - less-than
|
||||
{ ">", ">" }, // > - greater-than
|
||||
{"\'", "'"} // ' - quote
|
||||
};
|
||||
|
||||
protected static final String[][] ISO8859_1_ESCAPE = { //
|
||||
|
@ -119,6 +119,7 @@ public class HtmlUtilTest {
|
||||
Assert.assertEquals("<html><body>123'123'</body></html>", escape);
|
||||
String restoreEscaped = HtmlUtil.unescape(escape);
|
||||
Assert.assertEquals(html, restoreEscaped);
|
||||
Assert.assertEquals("\'", HtmlUtil.unescape("'"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user