前端内容转译html
其他地方采集过来的可以转译下,试试这个:
var returnReg = /\n/g;
detail = detail.replace(returnReg,"");
var reg = />|>|>|>/g;
detail = detail.replace(reg,">");
reg = /&amp;amp;lt;|&amp;lt;|&lt;|</g;
detail = detail.replace(reg,"<");
var returnReg = /\n/g;
detail = detail.replace(returnReg,"");
var reg = /&amp;amp;gt;|&amp;gt;|&gt;|>/g;
detail = detail.replace(reg,">");
reg = /&amp;amp;lt;|&amp;lt;|&lt;|</g;
detail = detail.replace(reg,"<");