htmr icon indicating copy to clipboard operation
htmr copied to clipboard

Handling of invalid element types

Open Bratn opened this issue 3 years ago • 1 comments

Html with invalid element types fails hard. What's the recommended way of handling this in case I can't control the input?

Sandbox: https://codesandbox.io/s/keen-northcutt-jgn9u7?file=/src/App.js

Bratn avatar Jul 20 '22 12:07 Bratn

Currently there's no way to handle invalid input. It was originally built to handle html from CMS (or other sources that you own), so you should be able to fix any invalid input

Do you have any suggestion on how we should approach this? Ignore the tag? force the tag name to be either character or (-)? If you have any experience handling this kind of thing in alternative libraries, please do share

pveyes avatar Jul 28 '22 03:07 pveyes