I am trying to remove the HTML tags from a string. Right now I am able to remove the complete HTML tags like for example dadsasdsad>
dadsasdsad>
Using javascript you can do this:
javascript
function removeHTMLTags(htmlString) { if(!htmlString) { return; } var mydiv = document.createElement("div"); mydiv.innerHTML = htmlString; return mydiv.textContent || mydiv.innerText || ''; }
[Source]