?

Log in

Calvin

Strip Tags in Javascript

Calvin

perplexed

It ain't what you don't know that gets you in trouble;
It's what you know for sure that ain't so.
- Mark Twain

Strip Tags in Javascript

Previous Entry Share Next Entry
perplexed
The example google found for me was a little ugly and slightly wrong, so here's my version:

/**
 * STRIP TAGS
 */
function stripTags(str){
    return str.replace(/(<[^>]+>)/g,'');
}
Powered by LiveJournal.com