Review main Merged

88256[TASK] Remove 'center' and 'font' tags in RTE processing

Garvin Hicking CR +2 V +2 Normal +77 −11 updated 03/29/25, 09:53

Commit message

The HTML tags 'center' and 'font' are deprecated. The CKEDitor
RTE by default utilizes '<span style="...">` tags to define
fonts and alignment.

With this change, the tags are added to the
`processing.HTLMparser_db.removeTags` configuration option.

This will no longer allow to store these two HTML tags in
database fields where the configuration is active, and
remove the tags from frontend output when the parseFunc
is active. A "important" ReST file describes this change
of behaviour, which is considered non-breaking in terms
of API, as it is a default configuration change only.

Tests are adapted for the new behavior.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Oliver Wand +1
    • Benni Mack +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Georg Ringer +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 4

Review log 2227

Show 2 earlier messages
  1. Garvin Hicking uploaded patch set 1 02/18/25, 08:05

  2. Mathias Brodala commented on patch set 1 02/18/25, 08:08

    Breaking-106192-AddCenterAndFontToYamlProcessingRemoveTags.rst:64

    I don't get this part. Did you mean: > Enabling ... via ... is not sufficient to keep the tags. Entering ... but when saving.
  1. core-ci voted on patch set 1 V +1 02/18/25, 08:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74296

  2. Garvin Hicking commented on patch set 1 02/18/25, 08:30

    Breaking-106192-AddCenterAndFontToYamlProcessingRemoveTags.rst:64 Reply

    Hm, I thought this was clear. How about: ``` The tags 'center' and 'font' could be configured via the `editor.conf.style.definitions` option (not set by default). This would allow the CKEditor to place 'center' and 'font' tags. However, when the tags are also listed in `removeTags` (now default), these tags would be removed when saving. ``` If you can provide an alternate wording for this that phrases this more precisely, I'd be happy to use that.
  3. Benni Mack commented on patch set 1 02/18/25, 13:00

    IMHO, this is not "breaking" but rather "important". Why? the API does not break, but people should have a note (doc) that - if they use it - they need to add this to their config again.
  4. Garvin Hicking commented on patch set 1 02/18/25, 13:06

    Reply

    Hm. I would argue that people lose current content with this change. I would argue anything that goes missing or a change in established/expectged behaviour would be documented as a breaking change. Having said that: I could change this to "important" of course, it is a rather "edgy" case, and these tags should have been removed since some time already, if the directive wasn't buggy. Let me sleep on it.
  5. Benni Mack commented on patch set 1 02/18/25, 13:13

    Reply

    They only loose content if the open + close an existing content (and that's what I see as Important, but not breaking)
  6. Oliver Wand voted on patch set 1 CR +1 02/18/25, 14:19

  7. Garvin Hicking uploaded patch set 2 CR +1 V +1 02/19/25, 11:29

  8. Garvin Hicking commented on patch set 2 02/19/25, 11:29

    Reply

    I moved it from breaking to important now.

    Breaking-106192-AddCenterAndFontToYamlProcessingRemoveTags.rst:64 Reply

    I changed this now and hope it's better.
  9. core-ci voted on patch set 2 V +1 02/19/25, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74378

  10. Benni Mack commented on patch set 2 CR -1 02/19/25, 11:43

    Important-106192-AddCenterAndFontToYamlProcessingRemoveTags.rst:17

    this is wrong. Please understand the different parts. RTEparseFunc (I think you mean lib.parseFunc_RTE) has nothing to do with RteHtmlParser, or the Processing.yaml or the RTE configuration. It just has a similar name. the RTE yaml configuration is there to describe a) what features/configuration the editor should have b) what the transformations / processing should do when reading content from the DB TO the RTE and vice versa (_rte and _db suffixes). This is crucial because this depends what is stripped away. lib.parseFunc_RTE allows to change, remove or add things when rendering content. For this: I personally would remove any information on lib.parseFunc_RTE. When rendering, the font tag still might be rendered because it is still in lib.parseFunc_RTE allowedTags / deniedTags (in FSC it is still included in the constants, but not used).
  11. Garvin Hicking commented on patch set 3 CR -1 V +1 02/19/25, 11:50

    Published edit on patch set 2.
  12. Garvin Hicking commented on patch set 3 02/19/25, 11:51

    Important-106192-AddCenterAndFontToYamlProcessingRemoveTags.rst:17 Reply

    Yes, you are right of course. I got side-tracked due to my YAML processing parsing efforts to harmonize TypoScript and YAML usage. Could you check if that fits better with you? Else I'm very open to any re-phrasing you see fit, please go ahead.
  13. core-ci voted on patch set 3 V +1 02/19/25, 11:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74381

  14. Benni Mack commented on patch set 4 V +1 02/19/25, 12:23

    Published edit on patch set 3.
  15. Benni Mack commented on patch set 4 02/19/25, 12:24

    Should we link to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font to demonstrate that this is deprecated?
  16. Garvin Hicking commented on patch set 5 02/19/25, 12:28

    Published edit on patch set 4.
  17. Garvin Hicking commented on patch set 5 02/19/25, 12:29

    Reply

    Yes. :)
  18. core-ci voted on patch set 4 V +1 02/19/25, 12:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74383

  19. core-ci voted on patch set 5 V +1 02/19/25, 12:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74384

  20. Oliver Wand voted on patch set 5 CR +1 02/19/25, 12:55

  21. Benni Mack commented on patch set 5 CR +1 V +1 02/19/25, 13:45

    Important-106192-AddCenterAndFontToYamlProcessingRemoveTags.rst:17 Reply

    Done
  22. Georg Ringer voted on patch set 5 CR +1 V +1 02/21/25, 16:59

  23. Garvin Hicking voted on patch set 5 CR +2 V +2 02/24/25, 08:21

  24. Garvin Hicking merged patch set 6 02/24/25, 08:22

  25. Lina Wolf commented on patch set 6 03/29/25, 09:53

    I think this should also be documented in the RTE manual. See also https://github.com/TYPO3-Documentation/Changelog-To-Doc/issues/1204 Help wanted.