Bug #22210

RTE transformation removes empty paragraphs before a header

Added by Konrad Schiertz over 3 years ago. Updated 3 months ago.

Status:Resolved Start date:2010-03-01
Priority:Must have Due date:
Assignee:Stanislas Rolland % Done:

0%

Category:Default
Target version:4.5.12
TYPO3 Version:4.5 Complexity:
PHP Version:
Votes: 0

Description

Strange effect:
If i set removeTrailingBR = 1 every time on saving one empty paragraph bevor a header tag will be removed.

1. Step:
<p> </p>
<p> </p>
<p> </p>
<h1>Example</h1>

2. Saving one time
<p> </p>
<p> </p>
<h1>Example</h1>

3. Saving the second time
<p> </p>
<h1>Example</h1>

and so on.

TYPO3 4.3.2
htmlarea 1.8.8
typical mode
(issue imported from #M13696)


Related issues

duplicates Core - Bug #36904: RTE: Empty paragraphs are not correctly transformed Resolved 2012-05-07

History

Updated by gr almost 2 years ago

  • Target version deleted (0)

Even if

RTE.default.init.removeTrailingBR = 0

is set, empty P-Tags (<p></p>) between text and a table get deleted

Text
         <- Line gets deleted when the content is saved, one line deleted per save
-Table-

This issue is NOT just "should have".

Updated by Harald Dolderer almost 2 years ago

I can aknowlege this behaviour in typo3 4.5.4
RTE.default.init.removeTrailingBR = 0 or RTE.default.removeTrailingBR = 0 doesn't change anything.
This should be adjusted soon.
It is a very anoying bug for Editors.
Thank you for checking.

Updated by Stanislas Rolland almost 2 years ago

  • Category set to rtehtmlarea
  • TYPO3 Version set to 4.5

Updated by Stanislas Rolland almost 2 years ago

removeTrailingBR has no effect on this behaviour.

Looks like a problem with the RTE transformation.

One of the paragraphs that contain only a space is lost on the way to the RTE.

Updated by Stanislas Rolland almost 2 years ago

  • Subject changed from removeTrailingBR = 1 removes empty paragraphs bevor a header to RTE transformation removes empty paragraphs before a header
  • Category changed from rtehtmlarea to Default
  • Assignee set to Stanislas Rolland
  • Priority changed from Should have to Must have

Updated by Konrad Schiertz over 1 year ago

  • Target version set to 4.5.8

This behaviour is allways active in typo3 4.5.7, really anoying for editors.

This part deletes one line when the content is saved, one line deleted per save.

class.t3lib_parsehtml_proc

Line: 1334-1336

if (trim(strip_tags($divSplit[$k])) == ' ' && !preg_match('/\<(img)(\s[^>]*)?\/?>/si', $divSplit[$k]) && !preg_match('/\<([^>]*)?( align| class| style| id| title| dir| lang| xml:lang)([^>]*)?>/si', trim($divSplit[$k]))) {
$divSplit[$k] = '';
}

Updated by Konrad Schiertz over 1 year ago

  • Target version changed from 4.5.8 to 4.5.10

This behaviour is again active in typo3 4.5.9.

Updated by Ernesto Baschny over 1 year ago

  • Target version changed from 4.5.10 to 4.5.12

Updated by Kurt Kunig 6 months ago

Bug is still in Version 4.7.7 existent!?

replace line 1343 in class.t3lib_parsehtml_proc.php
with

$divSplit[$k] = '&nbsp;';

instead of
$divSplit[$k] = '';

Updated by Stanislas Rolland 3 months ago

  • Status changed from New to Resolved

Also available in: Atom PDF