1、未处理
2、处理后
相关代码:
(1)jar包
(2)前端代码
${fns:removeHtml(algorithmNeed.needContent)}
(3)工具类
/**
* 富文本内容转换
* @param html
* @return
*/
public static String removeHtml(String html){
String unescape = StringEscapeUtils.unescapeHtml4(html);
String text = Jsoup.clean(unescape, Whitelist.simpleText());
return text;
}
(4)fns.tld文件配置
富文本内容转换
removeHtml
mon.utils.StringUtils
java.lang.String removeHtml(java.lang.String)
${fns:removeHtml(html)}