Ruin9999R
Convex Community6mo ago
16 replies
Ruin9999

What is a good way to implement user input sanitization (to prevent XSS)?

I've always been using dompurify to help with user input sanitization but it doesn't seem to work on the convex mutations. I think this could be because of the stripped down nodejs environment that convex uses. (Not sure if im right)

What are some other ways that you guys have implemented user input sanitization? Right now I've got some basic santization by using regex to filter out html elements but I'm hoping to use an opensourced library instead so I don't have to always keep up to date with any XSS prevention changes.
Was this page helpful?