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

mikeytown2’s picture

mikeytown2’s picture

Status: Active » Closed (duplicate)