var content;
var s = "";
if(str.length == 0) return "";
s = datas[i].content.replace(/&/g,"&");
s = s.replace(/</g,"<");
s = s.replace(/>/g,">");
s = s.replace(/ /g," ");
s = s.replace(/'/g,"\'");
s = s.replace(/"/g,"\"");
var textstr =s.replace(/<[^>]*>|/g,"")
解决方法链接:https://blog.csdn.net/wujiangwei567/article/details/41051225