报错:com.alibaba.fastjson.JSONException: illegal identifier : &pos 1, line 1, column
报错:com.alibaba.fastjson.JSONException: illegal identifier : &pos 1, line 1, column
原因:将HtmlUtils.htmlUnescape()错些成HtmlUtils.htmlEscape()
两种方法的不同:
String s=HtmlUtils.htmlEscape("
输出
hello world
String s2=HtmlUtils.htmlUnescape(s);
输出
hello world如果希望文本出现html标签的内容,如<>,这些符号,就是使用htmlUnescape(s)