#98202RTE removes class from hr due to processing.yaml definition
Description
A customer wanted to set a color to the horizontal line to change the color.
While developing i encountered the problem that the class was always removed. Debugging shows a different array for the hr-tag than for example the span, which allows at least the class.
In the typo3/sysext/rte_ckeditor/Configuration/RTE/Processing.yaml i found this special lines of code:
hr:
allowedAttribs:
- class
This breaks the logic for hr-tags in typo3/sysext/core/Classes/Html/HtmlParser.php (Line 480 and following)
(btw: i’m kind of confused about the “_allowedAttribs”)
a fix provided in the attached patch-file looks like this in my custom rte yaml file:
hr:
allowedAttribs: class
Thanks for taking a look at my first bug report
Reviews 4
Related issues 2
Files 1
History 511
-
Gerrit Code Review pushed patch set 3 for main to change 74498 status
NewUnder Review <span data-processor="relativetime" data-value="2022-08-25T08:25:13+00:00" > 08/25/22, 08:25 </span> -
Gerrit Code Review pushed patch set 1 for main to change 85549 <span data-processor="relativetime" data-value="2024-08-07T13:06:01+00:00" > 08/07/24, 13:06 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 85549 <span data-processor="relativetime" data-value="2024-10-18T13:42:33+00:00" > 10/18/24, 13:42 </span>
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-10-22T11:57:09+00:00" > 10/22/24, 11:57 </span>
Please note that at the time of this writing, CKEditor5 does NOT allow styling on
hrtags: https://github.com/ckeditor/ckeditor5/issues/12973 -
Gerrit Code Review pushed patch set 3 for main to change 85549 <span data-processor="relativetime" data-value="2025-03-11T10:38:15+00:00" > 03/11/25, 10:38 </span>
-
Gerrit Code Review pushed patch set 16 for main to change 74473 <span data-processor="relativetime" data-value="2025-03-25T09:10:01+00:00" > 03/25/25, 09:10 </span>
-
Garvin Hicking changed Related to #97499 Related to #96485 <span data-processor="relativetime" data-value="2025-03-25T09:27:31+00:00" > 03/25/25, 09:27 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 88734 <span data-processor="relativetime" data-value="2025-03-25T09:32:10+00:00" > 03/25/25, 09:32 </span>
-
Eric Harrer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-03-25T09:55:08+00:00" > 03/25/25, 09:55 </span>Applied in changeset commit:48673310321c42c99f54cd6a02058307c0d105fe.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-08-12T14:36:24+00:00" > 08/12/25, 14:36 </span>
I was working on a patch months ago. The main problem is, that the RTE fails to handle these declarations correctly. In legacy code those were just strings, since TYPO3 v8 and having CKEditor4 in place, that was extended to array items as well – however, both still need to be supported.
However, currently array item declarations are not fully supported…
see https://review.typo3.org/c/Packages/TYPO3.CMS/+/74498