dabblet icon indicating copy to clipboard operation
dabblet copied to clipboard

Can't paste html entities

Open oblitum opened this issue 12 years ago • 1 comments

The editor converts html entities to the corresponding reserved characters, so when I paste:

<span class="scIncluded">&lt;hello&gt;</span>

What I get in the editor is the < and > characters, which makes the html output broken:

<span class="scIncluded"><hello></span>

oblitum avatar Sep 13 '13 16:09 oblitum

This can be fixed by:

text = text.replace(/&/g, "&amp;");

before inserting html from clipboard.

oblitum avatar Sep 14 '13 19:09 oblitum