From 86e08b203968906586a1b1bfdc357ffb2700a64f Mon Sep 17 00:00:00 2001 From: venister Date: Thu, 4 Oct 2007 09:01:05 +0000 Subject: [PATCH] =?UTF-8?q?url()=EB=82=98=20url("")=EB=A1=9C=20css?= =?UTF-8?q?=EC=97=90=20=EC=9E=91=EC=84=B1=ED=95=9C=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=EB=A5=BC=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=ED=99=98=ED=95=98=EC=A7=80=20=EB=AA=BB=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2678 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/optimizer/Optimizer.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/optimizer/Optimizer.class.php b/classes/optimizer/Optimizer.class.php index 2209eba0a..fd8e9c908 100644 --- a/classes/optimizer/Optimizer.class.php +++ b/classes/optimizer/Optimizer.class.php @@ -131,7 +131,7 @@ EndOfBuff; **/ function replaceCssPath($file, $str) { $this->tmp_css_path = Context::getRequestUri().ereg_replace("^\.\/","",dirname($file))."/"; - $str = preg_replace_callback('!url\(("|\'){0,1}([^\)]+)("|\'){0,1}\)!is', array($this, '_replaceCssPath'), $str); + $str = preg_replace_callback('!url\(("|\')?([^\)]+)("|\')?\)!is', array($this, '_replaceCssPath'), $str); $str = preg_replace('!\/([^\/]*)\/\.\.\/!is','/', $str); @@ -141,7 +141,7 @@ EndOfBuff; function _replaceCssPath($matches) { if(eregi("^http",$matches[2])) return $matches[0]; if(eregi("^\.\/common\/",$matches[2])) return $matches[0]; - return sprintf('url(%s)', $this->tmp_css_path.$matches[2]); + return sprintf('url(%s%s)', $matches[1], $this->tmp_css_path.$matches[2]); } }