Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Sanitize Markdown Inputs #125

Open
bliutech opened this issue Sep 22, 2023 · 0 comments
Open

feat: Sanitize Markdown Inputs #125

bliutech opened this issue Sep 22, 2023 · 0 comments

Comments

@bliutech
Copy link
Member

Currently, to display the generated Markdown, we are using dangerouslySetInnerHTML which has some complex implications for security. To be truly cautious, it would be nice to use DOMPurify to sanitize all contributed blog posts. isomorphic-dompurify is probably the best library to use due to server side rendering. https://github.com/kkomelin/isomorphic-dompurify There may need to be a bit of wrangling with the Next.js build configuration due to including this library. kkomelin/isomorphic-dompurify#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant