html-react-parser icon indicating copy to clipboard operation
html-react-parser copied to clipboard

Parser is breaking when we are provinding some content <content>

Open NehaDelta opened this issue 1 year ago • 1 comments

When I am proving some content between <> without space like <testing content> the parser is breaking & If I am providing < testing content > then it is working fine.

I am using with React 18.

NehaDelta avatar Jul 01 '24 10:07 NehaDelta

@NehaDelta this is because the parser treats any content between <...> as a custom element. My recommendation is to escape the < and > as &lt; and &gt;.

remarkablemark avatar Jul 01 '24 15:07 remarkablemark

Closing issue due to inactivity

remarkablemark avatar Dec 17 '24 00:12 remarkablemark