Skip to content

Commit

Permalink
Fix data:image breaking in CSS when fixing relative paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cody Lundquist committed Mar 14, 2015
1 parent 0ddd00e commit ea8d857
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Munee/Asset/Type/Css.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function isScss($file)
*/
protected function fixRelativeImagePaths($content, $originalFile)
{
$regEx = '%(url[\\s]*\\()[\\s\'"]*([^\\)\'"]*)[\\s\'"]*(\\))%';
$regEx = '%(url[\\s]*\\()(?!data:image)[\\s\'"]*([^\\)\'"]*)[\\s\'"]*(\\))%';

$webroot = $this->request->webroot;
$changedContent = preg_replace_callback($regEx, function ($match) use ($originalFile, $webroot) {
Expand Down Expand Up @@ -258,4 +258,4 @@ protected function parseImports($content, $origFile)
return $content;
}

}
}

0 comments on commit ea8d857

Please sign in to comment.