Project

General

Profile

Actions

Bug #85777

closed

<f:spaceless> eats too many blank spaces

Added by Xavier Perseguers over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2018-08-08
Due date:
% Done:

0%

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

Description

My controller assign some HTML content to my view:

$foo = <<<HTML
<span class="adr">
                        <span class="type" style="display:none">work</span><span class="street-address">CP 184</span><br />
<span class="postal-code">1580</span> <span class="locality">Avenches</span> <span class="country-name" style="display:none">Switzerland</span>
                    </span>
HTML;

$this->view->assign('foo', $foo);

When the view shows the content straight, foo gets htmlentities'd but it works, however when content is raw-formatted:

{foo -> f:format.raw()}

then blank spaces between tags are eaten and result in this being outputted:

<span class="adr"><span class="type" style="display:none">work</span><span class="street-address">CP 184</span><br />
<span class="postal-code">1580</span><span class="locality">Avenches</span><span class="country-name" style="display:none">Switzerland</span></span>

(I added a break line after <br /> so that we see it more easily in this description.

Problem is that now in that particular example we have the postal code and the locality being shown visually together: 1580Avenches instead of 1580 Avenches.

This seems to be new since TYPO3 v8, same code works fine in TYPO3 v7.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #86862: Using <f:spaceless> in layout for rendering any fluid_styled_content element causes valid RTE content to be be destroyed.ClosedBenjamin Kott2018-11-06

Actions
Actions

Also available in: Atom PDF