36 ms·
I think sanitizing email is a solved problem with this: https://github.com/cure53/DOMPurify https://github.com/cure53/DOMPurify I'm not the author but I've us
by dugmartin 11y ago
I think sanitizing email is a solved problem with this:
https://github.com/cure53/DOMPurify https://github.com/cure53/DOMPurify
I'm not the author but I've used it in the past. According to the readme it is what Fastmail uses.
- dmbaggett 11y agoProbably not fast enough for us, but it is a very nice library. (We use libxml2.) The reference we test against, by the way, is Mike Cardwell's excellent Email Privacy Tester: https://emailprivacytester.com/ Try it on your own mail client!
- nmjenkins 11y agoWe have no speed problems using this in production at FastMail (we're kind of known for our speed in fact…). We use it at render time, both on desktop and mobile.
- Alex3917 11y agoAlso, Google has a tool called Caja that is open source: https://github.com/google/caja https://github.com/google/caja