Project

General

Profile

Actions

Bug #96466

open

RTE parse func paragraph duplication bug

Added by Lars Peter Søndergaard over 2 years ago. Updated 7 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2022-01-05
Due date:
% Done:

0%

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

Description

While having to deal with imported HTML from an external service, I encountered this odd Bug where, when a Text is followed by a line break and then followed by a self-closing p-tag, the previous text somehow gets duplicated in the output.

An example looks like this (in my case the html comes from a variable, but works the same):

<f:format.html>This is a weird TYPO3 Duplication Bug
<p/></f:format.html>

The "This is a weird TYPO3 Duplication Bug" text get's duplicated in the output.

I encountered it in TYPO3 9, but could confirm this behaviour in 10 and up to 11.5.4 as well.

I understand that a self-closing p-tag is not really proper html5, but I'd presume any other behaviour would be preferred over this duplication thing.

Greetings

Actions #1

Updated by Riccardo De Contardi almost 2 years ago

  • Category set to RTE (rtehtmlarea + ckeditor)
Actions #2

Updated by Riccardo De Contardi 7 days ago · Edited

This is still reproducible on TYPO3 13.2.0-dev (latest main)

Steps to reproduce

1) on a page, create a "Text" CE, take note of its uid
2) Open the DB, go on the tt_content table, identify the record created at point 1
3) On the bodytext field paste

This is a weird TYPO3 Duplication Bug
<p/>

4) Clear cache and visit the page

Result:

the line has been duplicated; the actual HTML is:

<p>This is a weird TYPO3 Duplication Bug</p>
<p></p><p>This is a weird TYPO3 Duplication Bug</p>

On the database, the content is still the one inserted at point 3.
If you open the CE on TYPO3 backend you will actually see some empty paragraphs including the one that would have contained the second phrase... if you save the CE (even without editing it) the frontend HTML will be "adjusted" with just the empty paragraphs

Actions

Also available in: Atom PDF