Node.js examples for String:Strip
Strip Script from HTML code
stripScript: function(html) { // script blocks html = html.replace(/<[^>]*script[^>]*>/gi, ""); // node events html = html.replace(/<[^>]*[\s]on[^>]*>/gi, ""); // other horrid things html = html.replace(/<[^>]*object[^>]*>/gi, ""); html = html.replace(/<[^>]*embed[^>]*>/gi, ""); html = html.replace(/<[^>]*iframe[^>]*>/gi, ""); return html;/* w w w . j a v a 2 s. c o m*/ },