Review main Abandoned

85640[BUGFIX] Prevent RTE removal of 'style' attribute on 'span'

Garvin Hicking CR 0 V 0 Easy +10 −1 updated 08/15/24, 10:01

Commit message

With #104520 the former hardcoded list of allowed attributes
for the 'span' tag is now dynamically retrieved, based on the
`processing.allowAttributes` RTE configuration. By default
in `EXT:rte_ckeditor/Configuration/RTE/Processing.yaml` this
is set to:

```
class, id, title, dir, lang, xml:lang, itemscope, itemtype, itemprop
```

Due to the absence of `style`, which is unwanted usually for
the `<p>` tags, applying this to `span` tags removed any
`style` definition, leading to an unwanted breaking change.

With this patch, the previous behaviour for 'span' tags
is restored, so that 'style' is allowed again.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 78

  1. Garvin Hicking uploaded patch set 1 08/14/24, 23:00

  2. core-ci voted on patch set 1 V +1 08/14/24, 23:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63424

  3. Oliver Hader commented on patch set 1 08/15/24, 06:22

    Would adding `style` to `allowAttributes` in `EXT:rte_ckeditor/Configuration/RTE/Processing.yaml solve the problem?
  4. Oliver Hader commented on patch set 1 08/15/24, 06:24

    Reply

    As an alternative, v12 still would have to use the hard-coded list like it was before #104520
  5. Garvin Hicking commented on patch set 1 08/15/24, 06:58

    Reply Unresolved

    when adding that, style would also be allowed for "p" tags too then; that would be a change in behaviour, not sure if it should be allowed?
  6. Oliver Hader marked it work in progress 08/15/24, 08:19

  7. Oliver Hader commented on patch set 1 08/15/24, 08:19

    I've created reverts for the previous commits in https://review.typo3.org/q/Ib63cc4733944ad98830ee269baf13f1b15076ef5
  8. Oliver Hader abandoned the change 08/15/24, 10:01

    The previous changes causing this scenario have been reverted.