From 15c394af375029974595fcd96feeadcb4e7005b8 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sat, 6 May 2006 23:54:40 +0200
Subject: [PATCH] url fixing in CSS compressor fixed #793

darcs-hash:20060506215440-7ad00-a04d6ebb428816b534b7b3636f050885bc02f266.gz
---
 lib/exe/css.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/exe/css.php b/lib/exe/css.php
index 48b5e2804..b63841a03 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)
  *
-- 
GitLab