Index: trunk/phase3/RELEASE-NOTES-1.18 |
— | — | @@ -250,6 +250,7 @@ |
251 | 251 | * (bug 28076) Thumbnail height limited to 360 pixels on Special:Listfiles |
252 | 252 | * (bug 22227) Special:Listfiles no longer throws an error on bogus file entries |
253 | 253 | * (bug 19408) user_properties.up_property: 32 bytes is not enough. |
| 254 | +* (bug 25262) Fix for minification of hardcoded data: URIs in CSS |
254 | 255 | |
255 | 256 | === API changes in 1.18 === |
256 | 257 | * (bug 26339) Throw warning when truncating an overlarge API result. |
Index: trunk/phase3/includes/libs/CSSMin.php |
— | — | @@ -120,8 +120,9 @@ |
121 | 121 | self::URL_REGEX . '(?P<post>[^;]*)[\;]?/'; |
122 | 122 | $offset = 0; |
123 | 123 | while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) { |
124 | | - // Skip absolute URIs |
125 | | - if ( preg_match( '/^https?:\/\//', $match['file'][0] ) ) { |
| 124 | + // Skip fully-qualified URLs and data URIs |
| 125 | + $urlScheme = parse_url( $match['file'][0], PHP_URL_SCHEME ); |
| 126 | + if ( $urlScheme ) { |
126 | 127 | // Move the offset to the end of the match, leaving it alone |
127 | 128 | $offset = $match[0][1] + strlen( $match[0][0] ); |
128 | 129 | continue; |