react-md-editor icon indicating copy to clipboard operation
react-md-editor copied to clipboard

Render crashing syntax bug

Open HueByte opened this issue 4 years ago • 3 comments

I've noticed that when you try for example add code like this:

<p align="center">
    <img src="https://i.pinimg.com/originals/ec/b3/45/ecb3455c4ab0058ec05769a7e9f93e49.gif" />
</p>

and then by mistake if you remove the space between img and src

<p align="center">
    <imgsrc="https://i.pinimg.com/originals/ec/b3/45/ecb3455c4ab0058ec05769a7e9f93e49.gif" />
</p>

this results in this error and failing to render anything.

Uncaught DOMException: Failed to execute 'createElement' on 'Document': 
The tag name provided ('imgsrc="https:') is not a valid name.

This is UX breaking problem, which I think should be fixed quickly.

HueByte avatar Sep 19 '21 03:09 HueByte

Is there any work on it?

HueByte avatar Nov 16 '21 00:11 HueByte

That's simply the structure of HTML, there's nothing to fix for that besides not removing the space.

carlgunderson avatar Jan 05 '22 23:01 carlgunderson

Any updates? There should be some event handler or event fired when that happens.

HueByte avatar Feb 11 '22 17:02 HueByte