mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
url()나 url("")로 css에 작성한 경우 경로를 제대로 변환하지 못하는 문제해결
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2678 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7cc9aafb2b
commit
86e08b2039
1 changed files with 2 additions and 2 deletions
|
|
@ -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]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue