Project

General

Profile

Actions

Bug #98202

open

RTE removes class from hr due to processing.yaml definition

Added by Daniel Kruse over 1 year ago. Updated over 1 year ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2022-08-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
processing hr class
Complexity:
easy
Is Regression:
Sprint Focus:
Needs Decision

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


Files

local_history.patch (766 Bytes) local_history.patch Patch file Daniel Kruse, 2022-08-25 07:48
Actions

Also available in: Atom PDF