import org.apache.commons.lang.StringEscapeUtils; public class EscapeHtml { /** * @param args */ public static void main(String[] args) { String aac = StringEscapeUtils.escapeHtml("我的天啊"); System.out.println(aac); String aa = StringEscapeUtils.unescapeHtml(aac); System.out.println(aa); } }
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/16023.html