[BUGFIX] Responsive Images - Remove whitespaces in tags 67/25067/4
authorSascha Egerer <sascha.egerer@dkd.de>
Wed, 30 Oct 2013 09:52:51 +0000 (10:52 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 12 Nov 2013 23:16:19 +0000 (00:16 +0100)
Remove some unnecessary whitespaces in the html
tags that are genereted by the responsive image feature.

Resolves: #53220
Releases: 6.2
Change-Id: I49e73d92c74a1d3e656b0e847b22473cecf19a53
Reviewed-on: https://review.typo3.org/25067
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index c9c71b3..56c4da4 100644 (file)
@@ -664,20 +664,20 @@ tt_content.image.20 {
                layoutKey = {$styles.content.imgtext.layoutKey}
                layout {
                        default {
-                               element = <img src="###SRC###" width="###WIDTH###" height="###HEIGHT###" ###PARAMS### ###ALTPARAMS### ###BORDER######SELFCLOSINGTAGSLASH###>
+                               element = <img src="###SRC###" width="###WIDTH###" height="###HEIGHT###" ###PARAMS######ALTPARAMS######BORDER######SELFCLOSINGTAGSLASH###>
                        }
                        srcset {
-                               element = <img src="###SRC###" srcset="###SOURCECOLLECTION###" ###PARAMS### ###ALTPARAMS######SELFCLOSINGTAGSLASH###>
+                               element = <img src="###SRC###" srcset="###SOURCECOLLECTION###"###PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###>
                                source = |*|###SRC### ###SRCSETCANDIDATE###,|*|###SRC### ###SRCSETCANDIDATE###
                        }
                        picture {
-                               element = <picture>###SOURCECOLLECTION###<img src="###SRC###" ###PARAMS### ###ALTPARAMS######SELFCLOSINGTAGSLASH###></picture>
+                               element = <picture>###SOURCECOLLECTION###<img src="###SRC###"###PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###></picture>
                                source = <source src="###SRC###" media="###MEDIAQUERY###"###SELFCLOSINGTAGSLASH###>
                        }
                        data {
-                               element = <img src="###SRC###" ###SOURCECOLLECTION### ###PARAMS### ###ALTPARAMS######SELFCLOSINGTAGSLASH###>
+                               element = <img src="###SRC###"###SOURCECOLLECTION######PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###>
                                source = data-###DATAKEY###="###SRC###"
-                               source.noTrimWrap = ;;
+                               source.noTrimWrap = ; ;;
                                source.noTrimWrap.splitChar = ;
                        }
                }
index f92fd43..89024e3 100644 (file)
@@ -1343,10 +1343,11 @@ class ContentObjectRenderer {
                        // This array is used to collect the image-refs on the page...
                        $GLOBALS['TSFE']->imagesOnPage[] = $source;
                        $altParam = $this->getAltParam($conf);
+                       $params = '';
                        if ($conf['params'] && !isset($conf['params.'])) {
                                $params = ' ' . $conf['params'];
-                       } else {
-                               $params = isset($conf['params.']) ? ' ' . $this->stdWrap($conf['params'], $conf['params.']) : '';
+                       } elseif ($conf['params'] && is_array($conf['params.'])) {
+                               $params = ' ' . $this->stdWrap($conf['params'], $conf['params.']);
                        }
 
                        $imageTagValues = array(