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
isolate rendering of markdown into a single React component #24394
Conversation
af5cdd4
to
d9f058c
Compare
d9f058c
to
1da5e80
Compare
|
||
render() { | ||
const processedMarkdown = processMarkdown(this.props.markdown, { renderer }); | ||
/* eslint-disable react/no-danger */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry a little bit about hiding this warning inside a slick wrapper — consumers may not realize the markdown
prop is vulnerable to unsafe HTML. I wonder if we should call this UnsafeRenderMarkdown
for clarity, until we start limiting what markup can be rendered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooooh, I like this.
Love the approach! One question about sharp edges / foot-guns. |
A component that currently uses
marked
for markdown rendering, but will eventually be updated to use remark.