public static String dencodeHTML(String t) {
if (t != null) {
t = t.replaceAll("&", "&");
t = t.replaceAll("@amp;", "&");
t = t.replaceAll(""", "\"");
t = t.replaceAll("@quot;", "\"");
t = t.replaceAll("<", "<");
t = t.replaceAll("@lt;", "<");
t = t.replaceAll(">", ">");
t = t.replaceAll("@gt;", ">");
t = t.replaceAll("’", "'");
t = t.replaceAll("@#146;", "'");
t = t.replaceAll(" ", " ");
t = t.replaceAll("@nbsp;", " ");
t = t.replaceAll("
", "\r");
t = t.replaceAll("
", "\n");
t = t.replaceAll(" ", " ");
t = t.replaceAll("%23", "#");
t = t.replaceAll("\n\r", "\n");
t = t.replaceAll("\r\n", "\n");
}
return t;
}
java后台将前台传递的特殊字符转意下传递到前台
最新推荐文章于 2023-09-24 01:01:47 发布