nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
16.91k stars 1.71k forks source link

Multiline XML opening tag is not escaped #3237

Open titovmx opened 2 months ago

titovmx commented 2 months ago

Describe the bug

The editor loses XML/HTML tags if the opening tag is written in a few lines.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://ui.toast.com/tui-editor
  2. Open WYSIWYG tab
  3. Paste the following XML:
    <Block
    orderId='abc'>
    <Block/>
  4. Switch to Markdown and back
  5. The opening tag is grey on Markdown tab and disappeared after switching back to WYSIWYG mode.

Expected behavior

I want to see the same XML

Screenshots

Screenshot 2024-04-08 at 13 37 48 Screenshot 2024-04-08 at 13 38 02 Screenshot 2024-04-08 at 13 38 13

Desktop:

Additional context

When the opening tag is written in one line it is properly escaped. The closing tag is also properly escaped in this example.