Bug #89611

Linebreaks in image description / caption not working

Added by Matthias Krappitz 12 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2019-11-07
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In TYPO3 9.5.11 when using EXT:fluid_styled_content and the "text with image" or "text with media" content elements when entering a multiline image description in the FAL image, the line breaks are not being rendered with br tags but just as normal text line breaks, so they have no visual effect in the html output in frontend.
IMHO in the following three partials there needs to be a f:format.nl2br viewhelper around the {file.description}:
EXT:fluid_styled_content/Resources/Private/Partials/Media/Type/Audio.html
EXT:fluid_styled_content/Resources/Private/Partials/Media/Type/Image.html
EXT:fluid_styled_content/Resources/Private/Partials/Media/Type/Video.html

Associated revisions

Revision 44ce3500 (diff)
Added by Georg Ringer 9 months ago

[BUGFIX] Respect line breaks in media's description

As the description is using a textarea element in the backend,
editors can add a multi-line text.
The line breaks should be shown in the frontend as well by using
f:format.nl2br.

Resolves: #89611
Releases: master
Change-Id: Ia2b1b2ef896004b1ec91a1719d48826efdc3fb91
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62629
Tested-by: TYPO3com <>
Tested-by: Guido Schmechel <>
Tested-by: Markus Klein <>
Tested-by: Daniel Goerz <>
Reviewed-by: Jan Stockfisch <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Guido Schmechel <>
Reviewed-by: Markus Klein <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Gerrit Code Review 10 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62629

#2 Updated by Gerrit Code Review 10 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62629

#3 Updated by Georg Ringer 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#4 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF