日期:2014-05-17 浏览次数:20667 次
/** HTML转义 **/ String s = HtmlUtils.htmlEscape("<div>hello world</div><p> </p>"); System.out.println(s); String s2 = HtmlUtils.htmlUnescape(s); System.out.println(s2);
<div>hello world</div><p>&nbsp;</p> <div>hello world</div><p> </p>