Project

General

Profile

Actions

Bug #14628

closed

CSS Styled Contnent and linebreaks inserted by t3lib_parsehtml_proc

Added by Stanislas Rolland over 19 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Content Rendering
Target version:
-
Start date:
2005-03-28
Due date:
% Done:

0%

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

Description

Method TS_transform_db of class t3lib_parsehtml_proc inserts supefluous linebreaks after tags PRE, UL, OL, H1, H2, H3, H4, H5, H6, TABLE and BLOCKQUOTE.
These get transforned in <p class="bodytext"> </p> by CSS Styled Content.

I don't know if the problem is in CSS Styled Content or in t3lib_parsehtml_proc, but, for the purposes of rtehtmlarea, I extended t3lib_parsehtml_proc replacing
$lastBR = $cc==$aC ? '' : chr(10);
with
$lastBR = ($css || $cc==$aC) ? '' : chr(10);
(issue imported from #M919)

Actions #1

Updated by Stanislas Rolland over 19 years ago

The above modification was removing to many linebreaks. The problem occurs only when the content element ends with one of the specified tags. The correction is then to add after:
$aC = count($blockSplit);
the following lines:
while($aC && !strcmp(trim($blockSplit[$aC-1]),'')) {
unset($blockSplit[$aC-1]);
$aC = count($blockSplit);
}
Perhaps removing just the last entry would be enough. In any case, the empty ending $blockSplit entry prevents the correct recognition of the tag as the last item of the content element.

Actions #2

Updated by Stanislas Rolland almost 19 years ago

Resolved in TYPO3 4.0

Actions

Also available in: Atom PDF