1function html_sanitize(html) { 2 const div = document.createElement('div'); 3 div.innerHTML = html; 4 const scripts = div.getElementsByTagName('script'); 5 6 for (let i = scripts.length - 1; i >= 0; i--) { 7 const script = scripts[i]; 8 if (!script.hasAttribute('data-token')) { 9 script.parentNode.removeChild(script); 10 } 11 } 12 13 return div.innerHTML; 14}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.