Mark
Mark
@webplantmedia I'm not sure, but I think it's worth creating an issue or discussion on Next.js to confirm. For now, I think 3 could resolve the issue for you, but...
@webplantmedia yes there's a possibility that if you remove circular reference that it would break `domToReact()`. This library is built using [html-dom-parser](https://github.com/remarkablemark/html-dom-parser), which uses [htmlparser2](https://github.com/fb55/htmlparser2) under the hood. That's where...
@NehaDelta this is because the parser treats any content between `` as a custom element. My recommendation is to escape the `` as `<` and `>`.
Closing issue due to inactivity
Thanks for opening this issue @m3m0m2! Can you provide a reproducible example via StackBlitz [JavaScript](https://stackblitz.com/edit/html-react-parser) or [TypeScript](https://stackblitz.com/edit/html-react-parser-typescript)?
Thanks for the reproducible example. This is indeed a bug and it's happening in [html-dom-parser](https://github.com/remarkablemark/html-dom-parser). The current workaround, like you noted in StackBlitz, is to not use self-closing tag: ```svg...
@m3m0m2 Actually if your HTML string contains a parent, this might fix your issue: https://stackblitz.com/edit/html-react-parser-1434?file=src%2FApp.js Let me know if this works: ```js const svgLines = ` `; parse(svgLines); ```
Does this resolve your issue? https://github.com/remarkablemark/html-react-parser/tree/v5.1.10#v5
Gotcha can you provide a reproducible example?
Closing issue due to inactivity