function n(a){const e=document.createElement("textarea");return e.innerHTML=a,e.value}function i(a){const e=new DOMParser().parseFromString(a,"text/html");return e.querySelectorAll("script, iframe, object, embed, form, base, link, meta").forEach(r=>r.remove()),e.querySelectorAll("*").forEach(r=>{Array.from(r.attributes).forEach(t=>{(t.name.startsWith("on")||t.name==="href"&&t.value.trimStart().startsWith("javascript:")||t.name==="src"&&t.value.trimStart().startsWith("javascript:"))&&r.removeAttribute(t.name)})}),e.body.innerHTML}export{n as d,i as s};
