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

isolate rendering of markdown into a single React component #24394

Merged
merged 7 commits into from Aug 29, 2018

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Aug 18, 2018

A component that currently uses marked for markdown rendering, but will eventually be updated to use remark.

@Hamms
Copy link
Contributor Author

Hamms commented Aug 18, 2018

@Hamms Hamms force-pushed the isolate-markdown-rendering branch from af5cdd4 to d9f058c Compare August 20, 2018 21:37
@Hamms Hamms force-pushed the isolate-markdown-rendering branch from d9f058c to 1da5e80 Compare August 20, 2018 23:21
@Hamms Hamms changed the title [WIP] isolate rendering of markdown into a single React component isolate rendering of markdown into a single React component Aug 20, 2018
@Hamms Hamms requested a review from joshlory August 21, 2018 00:01

render() {
const processedMarkdown = processMarkdown(this.props.markdown, { renderer });
/* eslint-disable react/no-danger */
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooooh, I like this.

@joshlory
Copy link
Contributor

Love the approach! One question about sharp edges / foot-guns.

@Hamms Hamms merged commit 528f41d into staging Aug 29, 2018
@Hamms Hamms deleted the isolate-markdown-rendering branch August 29, 2018 00:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants