From aea22f47b7ee1a9c6a852d5355eddbe444739eab Mon Sep 17 00:00:00 2001 From: Roy Duineveld Date: Thu, 9 Feb 2017 10:40:26 +0100 Subject: [PATCH] [bug-#169] Corrupted merged css file when using css data URIs See: https://github.com/just-better/magento1-css-merge-data-uri-fix --- app/code/core/Mage/Core/Model/Design/Package.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index 6e9a76d50e1c..01421dbe81e6 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -781,7 +781,7 @@ public function beforeMergeCss($file, $contents) $cssImport = '/@import\\s+([\'"])(.*?)[\'"]/'; $contents = preg_replace_callback($cssImport, array($this, '_cssMergerImportCallback'), $contents); - $cssUrl = '/url\\(\\s*(?!data:)([^\\)\\s]+)\\s*\\)?/'; + $cssUrl = '/url\\(\\s*(?![\\\'\\"]?data:)([^\\)\\s]+)\\s*\\)?/'; $contents = preg_replace_callback($cssUrl, array($this, '_cssMergerUrlCallback'), $contents); return $contents;