diff options
author | Michael Hamann <michael@content-space.de> | 2011-01-09 14:52:50 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-01-09 14:52:50 +0100 |
commit | 6e0b4b67444b8434ed2c351ea0e36008667251d5 (patch) | |
tree | 7becc46027688b2a07ad4321370a31211140ebe8 /lib/exe | |
parent | f7d780b9b82a664525120a90a8b1cb25be57d0e0 (diff) | |
download | rpg-6e0b4b67444b8434ed2c351ea0e36008667251d5.tar.gz rpg-6e0b4b67444b8434ed2c351ea0e36008667251d5.tar.bz2 |
Fixed css_loadfile and removed unneeded complexity, added testcases
Diffstat (limited to 'lib/exe')
-rw-r--r-- | lib/exe/css.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index eb2d96513..4db81de0b 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -267,8 +267,8 @@ function css_loadfile($file,$location=''){ $css = io_readFile($file); if(!$location) return $css; - $css = preg_replace('#(url\([ \'"]*)((?!/|http://|https://| |\'|"))#','\\1'.$location.'\\3',$css); - $css = preg_replace('#(@import\s+[\'"])((?!/|http://|https://))#', '\\1'.$location.'\\2"', $css); + $css = preg_replace('#(url\([ \'"]*)(?!/|http://|https://| |\'|")#','\\1'.$location,$css); + $css = preg_replace('#(@import\s+[\'"])(?!/|http://|https://)#', '\\1'.$location, $css); return $css; } |