CSSMin::minify()'s processing of url references for path adjustment or embedding had excluded explicit fully-qualified http: and https: URLs, but was damaging others such as data: URIs that were actually hardcoded into the original CSS.
This was affecting styles used on no.wikipedia.org which embedded a few icons directly into the style sheet.
Now checking for any URL scheme rather than hardcoding a check for http & https.
* (bug 28076) Thumbnail height limited to 360 pixels on Special:Listfiles
* (bug 22227) Special:Listfiles no longer throws an error on bogus file entries
* (bug 19408) user_properties.up_property: 32 bytes is not enough.
+* (bug 25262) Fix for minification of hardcoded data: URIs in CSS
=== API changes in 1.18 ===
* (bug 26339) Throw warning when truncating an overlarge API result.
self::URL_REGEX . '(?P<post>[^;]*)[\;]?/';
$offset = 0;
while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) {
- // Skip absolute URIs
- if ( preg_match( '/^https?:\/\//', $match['file'][0] ) ) {
+ // Skip fully-qualified URLs and data URIs
+ $urlScheme = parse_url( $match['file'][0], PHP_URL_SCHEME );
+ if ( $urlScheme ) {
// Move the offset to the end of the match, leaving it alone
$offset = $match[0][1] + strlen( $match[0][0] );
continue;