-
I was thinking about some sanitization library but found this: https://github.com/remarkablemark/html-react-parser which i have reviewed to deeply yet.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
DOMPurify
DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
Use DOMPUrify. That plus dangerouslySetInnerHTML and you're good to go.
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.
Related posts
-
Displaying WYSIWYG editor's output with React
-
Your rich text could be a cross-site scripting vulnerability
-
Understanding Cross-Site Scripting (XSS): A Quick Reference
-
Mitigate XSS exploits when using React's `dangerously SetInnerHTML`
-
Navigating the Security Risks of Arbitrary Values in Tailwind CSS