What do you use to sanitize user input with Remix on Cloudflare Pages?

101 Views Asked by At

I was trying to use the package sanitiza-html on my Remix app hosted on Cloudflare Pages without success. Later I understood that the problem is because this package depends on process pollyfill and Cloudflare does not use node as described HERE

I would like your suggestion of a safe alternative for sanitization server side and client side. I'm aware of isomorphic-dompurify but i don't like the fact that it uses JSDOM

1

There are 1 best solutions below

0
Big Rich On

I'm going to leave these 2x resources:

I was searching for some Cloudflare stuff and saw this post. My apologies but I've personally NOT used either of the above on Cloudflare, however, Happy-dom is mentioned directly as dependencies of at least 2 (two) Cloudflare-owned Github projects.