[BUGFIX] Table wizard: large fields and BR-tags 53/45953/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 15 Jan 2016 15:50:46 +0000 (16:50 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 15 Jan 2016 15:51:28 +0000 (16:51 +0100)
Large fields output newline as br-tag in frontend

Resolves: #72388
Releases: master, 7.6, 6.2
Change-Id: I8c225548249fc013452641c0316091701fcdca6a
Reviewed-on: https://review.typo3.org/45953
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php

index 4ab5acb..7707085 100644 (file)
@@ -148,6 +148,7 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                for ($a = 0; $a < $cols; $a++) {
                                        if (trim($cells[$a]) === '') {
                                                $cells[$a] = ' ';
+                                               $cells[$a] = preg_replace('|<br */?>|i', LF, $cells[$a]);
                                        }
                                        $cellAttribs = $noStyles ? '' : ($a > 0 && $cols - 1 == $a ? ' class="td-last td-' . $a . '"' : ' class="td-' . $a . '"');
                                        if ($headerPos == 'top' && !$k || $headerPos == 'left' && !$a) {