© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
How to sanitize user input on a worker? - Cloudflare Developers
CD
Cloudflare Developers
•
4y ago
Epailes
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
.
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
86,942
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Workern to worker fetch 1042
CD
Cloudflare Developers / workers-and-pages-help
4mo ago
How To Fetch A Worker From a Script On Localhost
CD
Cloudflare Developers / workers-and-pages-help
4mo ago
How to disable cron/scheduling on a deployed worker
CD
Cloudflare Developers / workers-and-pages-help
4mo ago
How to call a Worker from another Worker (403)
CD
Cloudflare Developers / workers-and-pages-help
2y ago