Issue Bug Closed

#96307<br/> tags (without whitespace) are converted to HTML entities

Albrecht Köhnlein 12/09/21, 15:23 updated 10/04/22, 14:14

Description

I have some RTE fields where the origin contents are not edited manually but came from other sources. This editor fields contain <br/> without whitespace as line breaks.

As soon as an editor wants to edit records with that RTE fields, the RTE converts the <br/> into &lt;br/&gt;, while everything is fine with <br> or <br /> (with whitespace). You can see the attached video.

I do not have an individual RTE configuration, this seems to be default behavior.

I was curious, what will happen with <hr/> tags and found out, the problem does not exist with <hr/>. There already is a hotfix/workaround that replaces <hr/> with <hr /> https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Html/RteHtmlParser.php#L389

Reviews 5