[TASK] CSS StyledContent wraps classes spaceBefore/After twice
authorSteffen Ritter <info@rs-websystems.de>
Wed, 5 Sep 2012 07:52:02 +0000 (09:52 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Sat, 22 Sep 2012 09:11:46 +0000 (11:11 +0200)
Since all top level TypoScript cObject are stdWrap enabled,
setting spaceBefore and spaceAfter fails as the outputtet
classnames are wrapped twice: once within the userFunc and
a second time by the general stdWrap execution.

As the stdWrap ist only meant to act as an configuration
for the userFunc, change the name accordingly, that it is
not processed by the default stdWrap anymore.

Change-Id: Id6f91429ef67351f922f261da0aeefeddc0f81b4
Fixes: #40642
Releases: 6.0
Reviewed-on: http://review.typo3.org/14363
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Mario Rimann
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php
typo3/sysext/css_styled_content/static/setup.txt

index b14a454..fcce15d 100644 (file)
@@ -1054,8 +1054,8 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
                                $declaration = 'margin-bottom: ' . $value . 'px;';
                        }
                        if (!empty($value)) {
-                               if ($configuration['stdWrap.']) {
-                                       $className = $this->cObj->stdWrap($value, $configuration['stdWrap.']);
+                               if ($configuration['classStdWrap.']) {
+                                       $className = $this->cObj->stdWrap($value, $configuration['classStdWrap.']);
                                } else {
                                        $className = $value;
                                }
@@ -1200,4 +1200,4 @@ class CssStyledContentController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlug
 }
 
 
-?>
\ No newline at end of file
+?>
index da3b7d9..0a9bdff 100644 (file)
@@ -133,7 +133,7 @@ lib.parseFunc_RTE {
                        # Recursive call to self but without wrapping non-wrapped cell content
                        default.stdWrap {
                                parseFunc =< lib.parseFunc_RTE
-                               parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag = 
+                               parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag =
                        }
                        addChr10BetweenParagraphs=1
                }
@@ -454,7 +454,7 @@ tt_content.stdWrap {
                                        userFunc = tx_cssstyledcontent_pi1->renderSpace
                                        space = before
                                        constant = {$content.spaceBefore}
-                                       stdWrap {
+                                       classStdWrap {
                                                noTrimWrap = |csc-space-before-| |
                                        }
                                }
@@ -464,7 +464,7 @@ tt_content.stdWrap {
                                        userFunc = tx_cssstyledcontent_pi1->renderSpace
                                        space = after
                                        constant = {$content.spaceAfter}
-                                       stdWrap {
+                                       classStdWrap {
                                                noTrimWrap = |csc-space-after-| |
                                        }
                                }