mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 20:27:58 +08:00
fixed #1118
This commit is contained in:
parent
fd3731b87f
commit
0dc720fad3
@ -16,6 +16,7 @@ public class Html4Escape extends ReplacerChain {
|
|||||||
{ "&", "&" }, // & - ampersand
|
{ "&", "&" }, // & - ampersand
|
||||||
{ "<", "<" }, // < - less-than
|
{ "<", "<" }, // < - less-than
|
||||||
{ ">", ">" }, // > - greater-than
|
{ ">", ">" }, // > - greater-than
|
||||||
|
{"\'", "'"} // ' - quote
|
||||||
};
|
};
|
||||||
|
|
||||||
protected static final String[][] ISO8859_1_ESCAPE = { //
|
protected static final String[][] ISO8859_1_ESCAPE = { //
|
||||||
|
@ -119,6 +119,7 @@ public class HtmlUtilTest {
|
|||||||
Assert.assertEquals("<html><body>123'123'</body></html>", escape);
|
Assert.assertEquals("<html><body>123'123'</body></html>", escape);
|
||||||
String restoreEscaped = HtmlUtil.unescape(escape);
|
String restoreEscaped = HtmlUtil.unescape(escape);
|
||||||
Assert.assertEquals(html, restoreEscaped);
|
Assert.assertEquals(html, restoreEscaped);
|
||||||
|
Assert.assertEquals("\'", HtmlUtil.unescape("'"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user