Merge "Skin: Make skins aware of their registered skin name"
[lhc/web/wiklou.git] / includes / libs / CSSMin.php
index a9c021e..ee88d0d 100644 (file)
@@ -149,15 +149,7 @@ class CSSMin {
                                '%2F' => '/', // Unencode slashes
                                '%3A' => ':', // Unencode colons
                                '%3D' => '=', // Unencode equals signs
-                               '%22' => '"', // Unencode double quotes
-                               '%0A' => ' ', // Change newlines to spaces
-                               '%0D' => ' ', // Change carriage returns to spaces
-                               '%09' => ' ', // Change tabs to spaces
                        ] );
-                       // Consolidate runs of multiple spaces in a row
-                       $encoded = preg_replace( '/ {2,}/', ' ', $encoded );
-                       // Remove leading and trailing spaces
-                       $encoded = preg_replace( '/^ | $/', '', $encoded );
                        $uri = 'data:' . $type . ',' . $encoded;
                        if ( !$ie8Compat || strlen( $uri ) < self::DATA_URI_SIZE_LIMIT ) {
                                return $uri;
@@ -223,7 +215,7 @@ class CSSMin {
                if ( preg_match( '!^[\w\d:@/~.%+;,?&=-]+$!', $url ) ) {
                        return "url($url)";
                } else {
-                       return "url('" . strtr( $url, [ '\\' => '\\\\', "'" => "\\'" ] ) . "')";
+                       return 'url("' . strtr( $url, [ '\\' => '\\\\', '"' => '\\"' ] ) . '")';
                }
        }