Bug #22210
closed
RTE transformation removes empty paragraphs before a header
Added by Konrad Schiertz about 14 years ago.
Updated over 6 years ago.
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)
- 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".
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.
- Category set to RTE (rtehtmlarea + ckeditor)
- TYPO3 Version set to 4.5
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.
- Subject changed from removeTrailingBR = 1 removes empty paragraphs bevor a header to RTE transformation removes empty paragraphs before a header
- Category changed from RTE (rtehtmlarea + ckeditor) to Miscellaneous
- Assignee set to Stanislas Rolland
- Priority changed from Should have to Must have
- 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] = '';
}
- Target version changed from 4.5.8 to 4.5.10
This behaviour is again active in typo3 4.5.9.
- Target version changed from 4.5.10 to 4.5.12
Bug is still in Version 4.7.7 existent!?
replace line 1343 in class.t3lib_parsehtml_proc.php
with
$divSplit[$k] = ' ';
instead of
$divSplit[$k] = '';
- Status changed from New to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF