mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 12:18:01 +08:00
fixed #1118
This commit is contained in:
parent
fd3731b87f
commit
0dc720fad3
@ -16,6 +16,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…
Reference in New Issue
Block a user