From 94ab016fb2dd672cb45fec0506fd15b35990848d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 16 Feb 2011 06:27:22 +0000 Subject: [PATCH] Followup r82156: skip relative URLs with absolute paths too --- includes/libs/CSSMin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index 5cd5a7d08c..e3b7cde48b 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -120,8 +120,8 @@ class CSSMin { self::URL_REGEX . '(?P[^;]*)[\;]?/'; $offset = 0; while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) { - // Skip absolute URIs - if ( preg_match( '/^https?:\/\//', $match['file'][0] ) ) { + // Skip absolute URIs and relative URIs with absolute paths + if ( preg_match( '/^(\/|https?:\/\/)/', $match['file'][0] ) ) { // Move the offset to the end of the match, leaving it alone $offset = $match[0][1] + strlen( $match[0][0] ); continue; -- 2.20.1