neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

Invalide HTML code in DB properties

Open markuspfeifenberger opened this issue 4 years ago • 1 comments

Description

If a property is configured as inlineEditable (true), without autoparagraph (false) and removeFormat (true), the HTML code sent to Neos and saved in the database is not valid, when the Code is pasted, eg using copy-paste of a formated browser content.

Steps to Reproduce

  1. NodeType configuration
properties:
    headline:
      type: string
      ui:
        inlineEditable: true
        inline:
          editorOptions:
            autoparagraph: false
            formatting:
              removeFormat: true
            placeholder: i18n
  1. Edit the headline in Neos and copy-paste HTML from a browser, e.g.:
<p><b>This text is bold</b></p>
<p><i>This text is italic</i></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>

(The code can be copied from https://www.w3schools.com/html/html_formatting.asp - first white box, all three lines)

Expected behavior

The code should be stored as correct HTML

This text is bold This text is italic This is subscript and superscript

Actual behavior

Request URL: /neos/ui-services/change sends the code, where the payload is changed and stored in the DB

This text is bold</span><span>This text is italic</span><span>This is subscript and superscript

Affected Versions

Neos: > 5

UI: 7.0.3

Screen Shot 2021-06-15 at 14 58 45

markuspfeifenberger avatar Jun 15 '21 13:06 markuspfeifenberger

Can confirm this bug in my customers project. I'll try to get some budget to fix it.

Sebobo avatar Sep 06 '22 09:09 Sebobo