Project

General

Profile

Actions

Bug #104839

closed

CKEditor YAML processing.HTMLparser_db.removeTags uses wrong syntax

Added by S P about 2 months ago. Updated 16 days ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2024-09-06
Due date:
% Done:

100%

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

Description

File: EXT:rte-ckeditor/Configuration/RTE/Processing.yaml

Line removeTags: [center, font, link, meta, o:p, sdfield, strike, style, title, u]

This does not work at all. Parser does ignore this line and removes none of these tags. These configs are transported to TSconfig as-is. TSconfig expects a CSV (and no array) there!

Correct is: removeTags: center, font, link, meta, o:p, sdfield, strike, style, title, u - then the parser removes the tags.

Discovered in v12, but I assume this never worked since the introduction of CKEditor.

I discovered this because CKEditor 5 does not allow getting rid of p-tags in RTE anymore (contrary to CKEditor 4, which had enterMode and autoParagraph settings). So at least the core persisting to DB should get rid of the p-tag once I add "p" to removeTags. It did not work and it did also not work for any other tag. So I switched from Array to CSV, and it instantly worked.

I did not test other config options, but I can imagine that other configs are also using arrays where TSconfig expects CSV.

Be careful: If you fix this then ALL setups using the shipped default RTE Presets after the update will then suddenly respect this setting and remove tags upon saving. Maybe there are people that just use the default config but still want to keep tags and are just not aware that some tags actually are forbidden by default.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #105254: PHP Warning: Undefined array key "removeTags." in typo3/cms-core/Classes/Html/HtmlParser.phpClosedGarvin Hicking2024-10-09

Actions
Actions #1

Updated by Garvin Hicking about 2 months ago

  • Status changed from New to In Progress
  • Priority changed from Should have to Must have

Thanks, I sadly had not yet the opportunity to respond to this and investigate.

I can confirm your research, and this is a "bad one". The breaking change implications are not easy to weigh in. We're discussing now how to proceed with.

Actions #2

Updated by Gerrit Code Review about 2 months ago

  • Status changed from In Progress to Under Review

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/+/86047

Actions #3

Updated by Gerrit Code Review about 2 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/+/86047

Actions #4

Updated by Gerrit Code Review about 2 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/+/86047

Actions #5

Updated by Gerrit Code Review about 2 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/+/86047

Actions #6

Updated by Gerrit Code Review about 2 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/+/86047

Actions #7

Updated by Gerrit Code Review about 1 month ago

Patch set 6 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/+/86047

Actions #8

Updated by Gerrit Code Review about 1 month ago

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/+/86215

Actions #9

Updated by Garvin Hicking 29 days ago

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

Updated by Georg Tiefenbrunn 22 days ago

  • Related to Bug #105254: PHP Warning: Undefined array key "removeTags." in typo3/cms-core/Classes/Html/HtmlParser.php added
Actions #11

Updated by Benni Mack 16 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF