htmr
htmr copied to clipboard
Handling of invalid element types
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
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