Replies: 1 comment
-
I think the reason in naming it like that is to make you think twice whether your usage is safe from a XSS vulnerability. React does it in a similar way https://react.dev/reference/react-dom/components/common#dangerously-setting-the-inner-html. If you render markdown in a safe way there should be no problem in using the property like that and you could e.g. add a comment above it why its safe. Also you could extract it into a separate component that takes the markdown source and internally converts and sanitizes it and then the usage sites should look nice. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We know it is dangerous in some cases. But the attribute is required to render markdown content.
Beta Was this translation helpful? Give feedback.
All reactions