How to sanitize user input on a worker?
Input will be stored in R2, then rendered to other users, so obviously I need to sanitize it.
Likely going to use https://editorjs.io/ on the client, but the server side validation is client agnostic 🙂
I know there's a few options like:
https://github.com/apostrophecms/sanitize-html
https://github.com/leizongmin/js-xss
https://github.com/cure53/DOMPurify
Just not sure if anyone can recommend any in case there's any issues getting them going on workers, any polyfills needed etc.
0 Replies