[BUGFIX] t3lib_Compressor breaks absolute paths in CSS
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_compressor.php
index 76aa9a8..ec560c9 100644 (file)
@@ -539,13 +539,13 @@ class t3lib_Compressor {
 
                        // Replace "url()" paths
                if (stripos($contents, 'url') !== FALSE) {
-                       $regex = '/url(\(\s*["\']?([^"\']+)["\']?\s*\))/iU';
+                       $regex = '/url(\(\s*["\']?(?!\/)([^"\']+)["\']?\s*\))/iU';
                        $contents = $this->findAndReplaceUrlPathsByRegex($contents, $regex, $newDir, '(\'|\')');
                }
 
                        // Replace "@import" paths
                if (stripos($contents, '@import') !== FALSE) {
-                       $regex = '/@import\s*(["\']?([^"\']+)["\']?)/i';
+                       $regex = '/@import\s*(["\']?(?!\/)([^"\']+)["\']?)/i';
                        $contents = $this->findAndReplaceUrlPathsByRegex($contents, $regex, $newDir, '"|"');
                }