Skip to content

Instantly share code, notes, and snippets.

@andreasvirkus
Created June 12, 2015 08:31
Show Gist options
  • Save andreasvirkus/97b0544604939e892af7 to your computer and use it in GitHub Desktop.
Save andreasvirkus/97b0544604939e892af7 to your computer and use it in GitHub Desktop.
function stripTags(htmlstr) {
var div = document.createElement('div');
div.innerHTML = htmlstr;
return div.textContent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment