[BUGFIX] Respect line breaks in media's description 29/62629/3
authorGeorg Ringer <georg.ringer@gmail.com>
Fri, 13 Dec 2019 19:24:12 +0000 (20:24 +0100)
committerDaniel Goerz <daniel.goerz@posteo.de>
Sun, 12 Jan 2020 12:40:06 +0000 (13:40 +0100)
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 <noreply@typo3.com>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Tested-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Jan Stockfisch <typo3@jan-stockfisch.de>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Type/Audio.html
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Type/Image.html
typo3/sysext/fluid_styled_content/Resources/Private/Partials/Media/Type/Video.html

index 0e73409..5dd4638 100644 (file)
@@ -5,7 +5,7 @@
     </div>
     <f:if condition="{file.description}">
         <figcaption class="audio-caption">
-            {file.description}
+            {file.description -> f:format.nl2br()}
         </figcaption>
     </f:if>
 </figure>
index e4bce75..a5145f9 100644 (file)
@@ -21,7 +21,7 @@
     </f:if>
     <f:if condition="{file.description}">
         <figcaption class="image-caption">
-            {file.description}
+            {file.description -> f:format.nl2br()}
         </figcaption>
     </f:if>
 </figure>
index cbb8c9d..265242f 100644 (file)
@@ -5,7 +5,7 @@
     </div>
     <f:if condition="{file.description}">
         <figcaption class="video-caption">
-            {file.description}
+            {file.description -> f:format.nl2br()}
         </figcaption>
     </f:if>
 </figure>