stripHTML
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Remove HTML tags from a string by parsing the HTML. There are certainly faster ways of doing this, ie
html.replace(/<\/[^>]+(>|$)/g, "")
// source https://stackoverflow.com/a/5002161
but this way is likely the most correct in that you're using a proper HTML parser.
Migrated from folder: Archive/stripHTML
