Motivation
Where is the isomorphic <SafelySetInnerHtml> component? I think this package is a good context to provide this component and pair it with CSP
Idea
HTML Sanitization has two sides: The client-side, that prevents XSS DOM -> Database, and the server-side, that prevents Database -> XSS DOM. The client-side could be implemented with DOMPurify and paired with trusted-types spec, the server-side with sanitize-html and paired with HTML preprocessing of getCspInitialProps (#40).
Resources
https://www.npmjs.com/package/dompurify
https://www.npmjs.com/package/sanitize-html
https://github.com/cure53/DOMPurify#what-about-dompurify-and-trusted-types