I want to remove all the html tags except or tags from a string using javascript. I have seen many questions like this but t
Try This
function remove_tags(html) { var html = html.replace("","||br||"); var tmp = document.createElement("DIV"); tmp.innerHTML = html; html = tmp.textContent||tmp.innerText; return html.replace("||br||",""); }