[BUGFIX] CSS inline style for image border gets corrupted after saving 08/48408/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:17:43 +0000 (15:17 +0200)
Resolves: #66844
Releases: master, 7.6, 6.2
Change-Id: I20fe7367433fe98a118890cc95306ee5e45504f4
Reviewed-on: https://review.typo3.org/48408
Tested-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/core/Classes/Html/RteHtmlParser.php

index 337187c..3a45d58 100644 (file)
@@ -377,7 +377,7 @@ class RteHtmlParser extends 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'] = '';