drupal_build_css_cache() attempts to resolve paths to background images with this statement:
$data .= preg_replace_callback('/url\([\'"]?(?![a-z]+:|\/+)([^\'")]+)[\'"]?\)/i', '_drupal_build_css_path', $contents);
This works fine for a shorthand background CSS statement like:
background: #00B1D4 url(some/path.jpg) no-repeat;
But not with the following (The match sent into _drupal_build_css_path() is something real ugly):
background-image:url(some/path.jpg);
To make it work you need to enclose url() in spaces:
background-image: url(some/path.jpg) ;
I don't have the regex chops to be able to know what's going on or how to fix it.
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedrelated issue #444228: Optimize CSS option causes php cgi to segfault in pcre function "match"
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commented#258846: CSS aggregation fails to parse some url()'s