받은데이터가 < > 와 & lt; & gt; 가 섞여있어서
먼저 통일시켜준후 꺽쇠 삭제하기로 !
정규식 자료는 검색해보니 많이 있어서 적당히 나한테 필요한 애들로 사용했다
function decode(contents) {
if(contents != undefined && contents != null && contents != '') {
contents = contents.replace(/<br\/>/ig,"\n");
contents = contents.replace(/</g,'<').replace(/>/g,'>');
contents = contents.replace(/<[^>]*>?/g,"");
}
return contents;
}
Product