[BUGFIX] Frontend shows HTML tags in messages 51/21551/4
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 20 Jun 2013 20:04:40 +0000 (22:04 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 21 Jun 2013 17:52:04 +0000 (19:52 +0200)
Hardcoded linebreak tags in StatusMessages were not resolved to
linebreaks, but included into the output.
Replacing the <br /> tags with the nl command using the nl2br
viewhelper on the message output solves the problem.

Releases: 6.2
Resolves: #49266
Change-Id: I07f6dd389df1ce3eedb2b2f957da91f14b8f566f
Reviewed-on: https://review.typo3.org/21551
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/install/Classes/Controller/Action/Tool/TestSetup.php
typo3/sysext/install/Resources/Private/Partials/Action/Common/StatusMessage.html

index 5e155cf..9fb1d21 100644 (file)
@@ -245,7 +245,7 @@ class TestSetup extends Action\AbstractAction implements Action\ActionInterface
                        $message = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\InfoStatus');
                        $message->setTitle('Compressed gif');
                        $message->setMessage(
-                               'Method used by compress: ' . $methodUsed . '<br />'
+                               'Method used by compress: ' . $methodUsed . LF
                                . ' Previous filesize: ' . $previousSize . '. Current filesize:' . $compressedSize
                        );
                } else {
@@ -464,8 +464,8 @@ class TestSetup extends Action\AbstractAction implements Action\ActionInterface
                                '\'niceText\' is a concept that tries to improve the antialiasing of the rendered type by'
                                . ' actually rendering the textstring in double size on a black/white mask, downscaling the mask'
                                . ' and masking the text onto the image through this mask. This involves'
-                               . ' ImageMagick \'combine\'/\'composite\' and \'convert\'.'
-                               . ' <br />If the image has another background color than the image above (eg. dark background'
+                               . ' ImageMagick \'combine\'/\'composite\' and \'convert\'.' . LF
+                               . ' If the image has another background color than the image above (eg. dark background'
                                . ' color with light text) then you will have to set TYPO3_CONF_VARS[GFX][im_imvMaskState]=1'
                        );
                        $testResults['niceText']['message'] = $message;
index dc2c281..bd5c9de 100644 (file)
@@ -1,8 +1,10 @@
-<div class="typo3-message message-{message.severity}" >
+<div class="typo3-message message-{message.severity}">
        <div class="header-container">
                <div class="message-header message-left"><strong>{message.title}</strong></div>
                <div class="message-header message-right"></div>
        </div>
-       <div class="message-body">{message.message}</div>
+       <div class="message-body">
+               <f:format.nl2br>{message.message}</f:format.nl2br>
+       </div>
 </div>
 <p></p>
\ No newline at end of file