mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
#19176294 외부페이지모듈에서 /에 xe가 설치된 경우 잘못된 경로로 수정되는 오류 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7741 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f9665d0136
commit
fd53b7422c
2 changed files with 6 additions and 5 deletions
|
|
@ -146,16 +146,17 @@
|
|||
|
||||
// 외부 또는 /, #, { 로 시작하는 경로라면 그냥 pass
|
||||
// /=absolute path, #=hash in a page, {=Template syntax
|
||||
if(preg_match('@^((?:http|https|ftp|telnet|mms)://|(?:mailto|javascript):|[/#{])@i',$val)) return $matches[0];
|
||||
if(preg_match('@^((?:http|https|ftp|telnet|mms)://|(?:mailto|javascript):|[/#{])@i',$val)) {
|
||||
return $matches[0];
|
||||
|
||||
// .. 와 같은 경우 대상 경로를 구함
|
||||
elseif(preg_match('/^\.\./i',$val)) {
|
||||
$p = Context::pathToUrl($this->path).'/';
|
||||
} elseif(preg_match('/^\.\./i',$val)) {
|
||||
$p = Context::pathToUrl($this->path);
|
||||
return sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]);
|
||||
}
|
||||
|
||||
if(substr($val,0,2)=='./') $val = substr($val,2);
|
||||
$p = Context::pathToUrl($this->path).'/';
|
||||
$p = Context::pathToUrl($this->path);
|
||||
return sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue