Fixes issues with complex background rules containing extra information after the...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Thu, 9 Sep 2010 21:41:05 +0000 (21:41 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Thu, 9 Sep 2010 21:41:05 +0000 (21:41 +0000)
includes/libs/CSSMin.php

index 15dfa06..bfe179f 100644 (file)
@@ -82,7 +82,7 @@ class CSSMin {
         * @return string Remapped CSS data
         */
        public static function remap( $source, $path, $embed = true ) {
-               $pattern = '/((?<embed>\s*\/\*\s*\@embed\s*\*\/)(?<rule>[^\;\}]*))?url\([\'"]?(?<file>[^\?\)\:]*)\??[^\)]*[\'"]?\)(?<extra>[^;]*)[\;]?/';
+               $pattern = '/((?<embed>\s*\/\*\s*\@embed\s*\*\/)(?<rule>[^\;\}]*))?url\([\'"]?(?<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\)(?<extra>[^;]*)[\;]?/';
                $offset = 0;
                while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) {
                        // Shortcuts