[BUGFIX] CSS inline style for image border gets corrupted after saving 41/48441/2
authorFrank Naegler <frank.naegler@typo3.org>
Mon, 30 May 2016 16:33:33 +0000 (18:33 +0200)
committerJan Helke <typo3@helke.de>
Fri, 3 Jun 2016 13:26:28 +0000 (15:26 +0200)
Resolves: #66844
Releases: master, 7.6, 6.2
Change-Id: I20fe7367433fe98a118890cc95306ee5e45504f4
Reviewed-on: https://review.typo3.org/48441
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Html/RteHtmlParser.php

index 45dc29c..2d7f59b 100644 (file)
@@ -459,7 +459,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser
                         }
                     }
                     // Remove width and height from style attribute
-                    $attribArray['style'] = preg_replace('/((?:^|)\\s*(?:width|height)\\s*:[^;]*(?:$|;))/si', '', $attribArray['style']);
+                    $attribArray['style'] = preg_replace('/(?:^|[^-])(\\s*(?:width|height)\\s*:[^;]*(?:$|;))/si', '', $attribArray['style']);
                     // Must have alt attribute
                     if (!isset($attribArray['alt'])) {
                         $attribArray['alt'] = '';