Skip to content
Snippets Groups Projects
Commit 2ff71fb5 authored by Benni Mack's avatar Benni Mack
Browse files

[TASK] Make RteHtmlParser entrypoint API cleaner

The RteHtmlParser has two public methods:
->init()
->RTE_transform()

init() was introduced in early PHP4 times when there was no constructor in PHP.
RTE_transform() contained a lot of parsing of properties, which is not needed
anymore since TYPO3 v8. init() itself is not needed anymore.

Since TYPO3 v8, RteHtmlParser is much cleaner towards the developer,
and the last step for this PHP class is to clearly separate the logic for the transformations in each direction, making two new entrypoints:
->transformTextForRichTextEditor($content, $configuration)
->transformTextForPersistence($content, $configuration)

This way, all logic is separated in these two methods, and the existing
RTE_transform() method is just a shell, which is not needed anymore.

Resolves: #90258
Releases: master
Change-Id: Iba140d71c5cd954dab4cf1fe4bfaca2233527e50
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63070


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
parent a955d9fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment