function trimHtml(html) { ? return html ? ? .replace(/<!--.*?-->/gi, '') ? ? .replace(/\/\*.*?\*\//gi, '') ? ? .replace(/[ ]+</gi, '<') ? ? // .replace(/<script[^]*<\/script>/gi, '') ?? ?.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '') ?? ?// .replace('/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi', '') ?? ?// .replace(/(\(function()[^]*)()/gi, '') ? ? // .replace(/<style[^]*<\/style>/gi, ''); ? ? //.replace('/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi', '') ?? ?.replace(/<style>[\s\S]*?<\/style>/ig, '') }
var testa = document.getElementsByTagName('body')[0].outerHTML; var scripts = testa.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"") ?
|