From: Roan Kattouw Date: Wed, 16 Feb 2011 06:27:22 +0000 (+0000) Subject: Followup r82156: skip relative URLs with absolute paths too X-Git-Tag: 1.31.0-rc.0~31980 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=94ab016fb2dd672cb45fec0506fd15b35990848d;p=lhc%2Fweb%2Fwiklou.git Followup r82156: skip relative URLs with absolute paths too --- 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;