Project

General

Profile

Actions

Bug #81577

closed

f:format.html / parseFunc removes spaces between tags

Added by Christopher Zechendorf over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-06-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
bug, parsefunc, html, formatting, frontend
Complexity:
Is Regression:
Sprint Focus:

Description

If italic text is followed by bold text the space between the two strings is removed.

This bug can be reproduced on a vanilla TYPO3 8.7.1 installation

<f:format.html><p><strong>Strong</strong> <em>Italic</em></p></f:format.html>

When rendering this it will show

Italic*Strong*


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #81616: TYPO3 generated HTML-output strips off whitespaces/linebreaks between tags.Closed2017-06-19

Actions
Actions #1

Updated by Christopher Zechendorf over 7 years ago

Sorry. Formatting didn't pan out.

It outputs:

<p><strong>Strong</strong><em>Italic</em></p>

Actions #2

Updated by Christopher Zechendorf over 7 years ago

  • Subject changed from parseFunc removes spaces between tags to f:format.html / parseFunc removes spaces between tags
  • Assignee deleted (Christopher Zechendorf)
  • Estimated time deleted (2.00 h)
  • Complexity deleted (medium)
Actions #3

Updated by Christopher Zechendorf over 7 years ago

Further research resulted in this insight:

It has nothing to do with format.html - the result of a fluid_styled_content - Content-Element will be cleaned in a way that all whitespace between tags will be removed. Only newlines are kept.

<strong>Strong</strong> <em>em</em>

Will also be reduced to.

<strong>Strong</strong><em>em</em>

This does not happen when a regular FLUIDTEMPLATE TS Object is generated.

This means the behavior either happens somewhere in fluid_styled content or in the content object itself. Using css_styled_content will not result in this behavior.

Actions #4

Updated by Christopher Zechendorf over 7 years ago

  • % Done changed from 0 to 100

And I've found the reason.

The Layout in fluid_styled_content

typo3/sysext/fluid_styled_content/Resources/Private/Layouts/Default.html

encapses everything in

<f:spaceless>

which results in the behavior.

So this is not a bug but a feature (...i guess).

Actions #5

Updated by Riccardo De Contardi over 7 years ago

  • Target version deleted (next-patchlevel)

I close this issue as the behavior is intended - see https://fluidtypo3.org/viewhelpers/fluid/master/SpacelessViewHelper.html

If you think that this is the wrong decision please reopen it or open a new issue with a reference to this one. Thank you.

Actions #6

Updated by Riccardo De Contardi over 7 years ago

  • Status changed from New to Closed
Actions #7

Updated by Mona Muzaffar over 7 years ago

  • Related to Bug #81616: TYPO3 generated HTML-output strips off whitespaces/linebreaks between tags. added
Actions

Also available in: Atom PDF