diff --git a/lib/exe/css.php b/lib/exe/css.php
index 48b5e2804c1647a46a3d1a739b8ddca4754323c5..b63841a03cdb412eb9fea8b0079cf4f0a4beb1f9 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -221,10 +221,11 @@ function css_loadfile($file,$location=''){
     $css = io_readFile($file);
     if(!$location) return $css;
 
-    $css = preg_replace('!(url\( *)([^/])!','\\1'.$location.'\\2',$css);
+    $css = preg_replace('#(url\([ \'"]*)((?!/|http://|https://| |\'|"))#','\\1'.$location.'\\3',$css);
     return $css;
 }
 
+
 /**
  * Returns a list of possible Plugin Styles (no existance check here)
  *