hey, people who know about the HTML Sanitizer API, two questions. 1. am I right ...
Stuart Langridge @sil@mastodon.social
hey, people who know about the HTML Sanitizer API, two questions.
1. am I right in thinking that if I've got a string of HTML I want sanitized, and what I want is a string of sanitized HTML (_not_ to insert it into the page), then I need to do something like temp=document.createElement("div"); temp.setHTML(unsafeHTML); safeHTML=temp.innerHTML ?
2. https://github.com/AegisJSProject/sanitizer seems an OK polyfill? (gotta polyfill it, it's not in Safari at all, it seems)