AztecEditor-iOS icon indicating copy to clipboard operation
AztecEditor-iOS copied to clipboard

Generated HTML for edited links containing multibyte characters is weird.

Open jklausa opened this issue 7 years ago • 1 comments

This is another side-effect of the underlying bug behind #853. #854 improves how the editor behaves when tapping on the "link" button in the toolbar, but the output HTML stills isn't great.

Expected behavior

After creating a link containing multibyte characters and then editing it, there's only one <a> element in the HTML output:

<a href="https://example.com">❤️ test 👍</a>

Actual behavior

Multiple <a> elements are present in the output:

<p>
<a href="http://example.com">❤️</a><a href="http://example.com"> test </a><a href="http://example.com">👍</a>
</p>

Steps to reproduce the behavior

  1. Insert a link with any URL, consisting of multi-byte characters (two emojis is probably the easiest).
  2. Put a cursor between the two characters.
  3. Start typing something, I usually add test in between the two.
  4. Look at the resulting HTML.

jklausa avatar Dec 12 '17 18:12 jklausa

Still got the problem, any idea what causes it or how to fix it?

shengyang998 avatar Mar 08 '19 03:03 shengyang998