Project

General

Profile

Actions

Bug #102507

closed

Epic #99669: CKEditor5 Collection

CKEditor do not remove Tags (Office-Tags like o:p) properly after updated to TYPO3 12.4.7

Added by LUKA netconsult 12 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-11-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The CKeditor does not properly remove the Tags defined in

EXT:rte_ckeditor/Configuration/RTE/Processing.yaml
processing:

  ## CONTENT TO DATABASE
  HTMLparser_db:

    ## REMOVE OPEN OFFICE META DATA TAGS, WORD 2003 TAGS, LINK, META, STYLE AND TITLE TAGS, AND DEPRECATED HTML TAGS
    ## We use this rule instead of the denyTags rule so that we can protect custom tags without protecting these unwanted tags.
    removeTags: [center, font, link, meta, o:p, sdfield, strike, style, title, u]

I have testet it in a plain TYPO3 installation with only the bootstrap package added.

When i add this test source n the RTE

<p>
    <sdfield>sdfield</sdfield>
    <font>font</font>
</p>
<center>center</center>
<o:p>o:p</o:p>

and save it, i get this result:
<p>
    &lt;sdfield&gt;sdfield&lt;/sdfield&gt;&nbsp;<font>font</font>
</p>
<p>
    center
</p>
<p>
    &lt;o:p&gt;o:p&lt;/o:p&gt;
</p>

The <center>-Tag as removed as expected, the <o:p>-Tag and the <sdfield>-Tag is converted to htmlspecialchars and the <font>-Tag is not changed at all.

In TYPO3 version 12.4.6 it all works as expected.

We find out, that the in the file

EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml
the following part seems to cause this:
    htmlSupport:
      allow:
        # Allow any class or any data attribute in any (configured) tag
        - { classes: true, attributes: { pattern: 'data-.+' } }

If i remove this, the Tags are all removed properly. But then no classes in no Tags are allowed and so no Style is persistent.

If i change this line and add a tag-name it also works as expected but classes then are only allowed for this tag only.

    htmlSupport:
      allow:
        # Allow any class or any data attribute in any (configured) tag
        - { name: 'div', classes: true, attributes: { pattern: 'data-.+' } }


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #102522: Paste from word keeps o:p tagClosed2023-11-27

Actions
Actions #1

Updated by Chris Müller 12 months ago

  • Related to Bug #102522: Paste from word keeps o:p tag added
Actions #2

Updated by Chris Müller 12 months ago

  • Parent task set to #99669
Actions #3

Updated by Gerrit Code Review 12 months ago

  • Status changed from New to Under Review

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81995

Actions #4

Updated by Gerrit Code Review 12 months ago

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82012

Actions #5

Updated by Gerrit Code Review 12 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82012

Actions #6

Updated by Gerrit Code Review 12 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82012

Actions #7

Updated by Gerrit Code Review 12 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82012

Actions #8

Updated by Gerrit Code Review 12 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82012

Actions #9

Updated by Gerrit Code Review 12 months ago

Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81995

Actions #10

Updated by Anonymous 12 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF