mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
apache rewrite 사용중일경우
본문의 링크 재정의 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4664 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5bca2eacfd
commit
9a8f340ec6
1 changed files with 6 additions and 0 deletions
|
|
@ -251,6 +251,12 @@
|
|||
$_SESSION['accessible'][$this->document_srl] = true;
|
||||
|
||||
$content = $this->get('content');
|
||||
|
||||
// rewrite모듈을 사용하면 링크 재정의
|
||||
$oContext = &Context::getInstance();
|
||||
if($oContext->allow_rewrite) {
|
||||
$content = preg_replace('/<a([ \t]+)href=("|\')\.\/\?/i',"<a href=\\2". Context::getRequestUri() ."?", $content);
|
||||
}
|
||||
|
||||
// url에 대해서 정규표현식으로 치환
|
||||
//$content = preg_replace('!([^>^"^\'^=])(http|https|ftp|mms):\/\/([^ ^<^"^\']*)!is','$1<a href="$2://$3" onclick="window.open(this.href);return false;">$2://$3</a>',' '.$content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue