Return to Snippet

Revision: 17480
at September 6, 2009 21:26 by enchance


Initial Code
String.prototype.stripTags = function () {
   return this.replace(/<([^>]+)>/g,'');
}


/ Usage:
var tmp = '<a href="htpp://somespammer.com">Some Link</a>';
var safe= tmp.stripTags(); // Returns "Some Link";

Initial URL

                                

Initial Description

                                

Initial Title
Strips tags from HTML text

Initial Tags
text, links

Initial Language
JavaScript