tomayac’s avatartomayac’s Twitter Archive—№ 15,783

  1. Wow, the HTML Sanitizer API is a useful potential Web platform addition: const safe = (new Sanitizer()).sanitize( <script> alert("pwned 😈") </script> <p>Harmless 👼</p> ); safe.children.length; // 1 safe.children[0]; // <p> t.co/xbhqUoSGZ7
    1. …in reply to @tomayac
      For people thinking this comes out of nowhere: it doesn’t. Here’s the in-flux spec: wicg.github.io/sanitizer-api/.