Project

General

Profile

Actions

Bug #102202

open

RteHtmlParser: Wrong caching for getKeepTags

Added by Stefan Neufeind 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-10-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

We tracked down problems with the RTE where it was not possible to add proper processing-instructions for a custom preset. In our site-package we had a RTE-yaml-configuration which included:

processing:
allowTags:
- form
- input

But those tags weren't recognized. It turned out that in typo3/sysext/core/Classes/Html/RteHtmlParser.php, function getKeepTags() there is a cache $this->getKeepTags_cache which got filled by the default-RTE-configuration of a previous field and the tag-list compiled there was later used against another field with out custom-configuration. Emptying the cache in this function, actually causing it to be compiled "fresh" every time, made the functionality respect the given allowTags-configuration for our field.

I can't say if the situation in newer TYPO3-versions is different. A newer CKEditor is integrated - but has the RteHtmlParser or the caching changed significantly?
I wonder why this hasn't turned up elsewhere. Was it a special case here maybe because of multiple RTE-fields in a flexform-configuration used on the TYPO3 backend? Would separate caching for each field have been used (separate RteHtmlParser-instances?) if the fields wouldn't have been part of one big flexform or so?

No data to display

Actions

Also available in: Atom PDF