Review 12.4 Merged

86215[BUGFIX] Apply `removeTags` in RTE YAML default processing

Garvin Hicking CR +2 V +2 Hard +274 −56 updated 10/02/24, 13:03

Commit message

The RTE YAML configuration `Processing.yaml` defined `removeTags`
as an array, while the HTMLParser only evaluated strings as input.

Due to this, `removeTags` in the TYPO3 default YAML config
were never applied, and thus tags were NOT removed before getting
persisted into the database. They were however escaped in the
frontend output, apart from the tags:

- `center`
- `font`
- `img`
- `strike`
- `u`

Only Page TSconfig processing configuration was properly
applied before.

With this bugfix, the following things change:

- A functional test is introduced to verify the behavior.

- The 'security' related test has been adapted, because
  now title tags are already stripped. Test has also
  been enhanced to address the `removeTags` influence.

- The tags `u` and `strike` are no longer removed, because
  they were set as allowTags earlier on, and that
  should take precedence.

- The tags `center` and `font` remain to be allowed now,
  to not introduce a breaking change.

- A note has been added that in TYPO3 v14 the original
  intent to remove `center`, `font` and probably
  `strike` are to be added to `removeTags` and thus
  removed in the future from database persistence.

- The YAML directive is now configured to both
  parse a string list or an array. This will
  allow existing YAML configurations to properly
  take effect without manual fixing.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 2

Files 5

Review log 34

  1. Garvin Hicking commented on patch set 1 09/19/24, 15:10

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 09/19/24, 15:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66225

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 10/02/24, 13:02

  4. Garvin Hicking merged patch set 2 10/02/24, 13:03