escapeHtml does't work properly in react-markdown #576
-
looks like escapeHtml is enabled by default. If my input has special character in the input string, it renders the special character instead of rending the original string. For example, if the string is "This is euro & #8364;", when it renders, it renders "This is euro €" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Is there a way to keep showing the special character encoding in the output rather than converting it into the real character? |
Beta Was this translation helpful? Give feedback.
-
That's because it isn't HTML specific, that is how markdown works It sounds like what you are really after is an inline code block This is euro `€` or an escape character This is euro \€ |
Beta Was this translation helpful? Give feedback.
That's because it isn't HTML specific, that is how markdown works
https://spec.commonmark.org/dingus/?text=%26%238364%3B%0A
and also why you had to add a space in GitHub, because GitHub flavored markdown builds on CommonMark.
It sounds like what you are really after is an inline code block
or an escape character