AztecEditor-iOS
AztecEditor-iOS copied to clipboard
Generated HTML for edited links containing multibyte characters is weird.
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
- Insert a link with any URL, consisting of multi-byte characters (two emojis is probably the easiest).
- Put a cursor between the two characters.
- Start typing something, I usually add
test
in between the two. - Look at the resulting HTML.
Still got the problem, any idea what causes it or how to fix it?