From 64e5faa430ebafe3c2141de8b61b0d745141e590 Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Tue, 15 Feb 2011 00:49:34 +0000 Subject: [PATCH] Resolves remaining issues in r82000 with remapping relative CSS URLs that contained queries. --- includes/libs/CSSMin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index 65268e1dc6..5cd5a7d08c 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -36,7 +36,7 @@ class CSSMin { * which when base64 encoded will result in a 1/3 increase in size. */ const EMBED_SIZE_LIMIT = 24576; - const URL_REGEX = 'url\(\s*[\'"]?(?P[^\?\)\'"]*)\??[^\)\'"]*[\'"]?\s*\)'; + const URL_REGEX = 'url\(\s*[\'"]?(?P[^\?\)\'"]*)(?P\??[^\)\'"]*)[\'"]?\s*\)'; /* Protected Static Members */ @@ -130,6 +130,7 @@ class CSSMin { $embed = $match['embed'][0]; $pre = $match['pre'][0]; $post = $match['post'][0]; + $query = $match['query'][0]; $url = "{$remote}/{$match['file'][0]}"; $file = "{$local}/{$match['file'][0]}"; $replacement = false; @@ -163,7 +164,7 @@ class CSSMin { } } else if ( $local === false ) { // Assume that all paths are relative to $remote, and make them absolute - $replacement = "{$embed}{$pre}url({$url}){$post};"; + $replacement = "{$embed}{$pre}url({$url}{$query}){$post};"; } if ( $replacement !== false ) { // Perform replacement on the source -- 2.20.1