I want to feel safe displaying user-generated HTML

Submitted by JJ Behrens

Many web applications allow untrusted users to upload HTML. They often do this using a rich text editor. Then, they show this HTML to other users. Email applications like Gmail are like this. However, displaying user-generated HTML is challenging from a security point of view. Sometimes you can sanitize it on the server. Sometimes you can sanitize it on the client using something like DOMPurify. However, no matter how you do it, it’s a hard problem.

It'd be great if browsers could do this for us since they know how to do it best.

Tagged
HTML JavaScript Forms