글/댓글의 내용 자동 링크 기능 적용

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2735 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-10-11 03:57:41 +00:00
parent 5bdad63b7f
commit d58f1590dd
2 changed files with 9 additions and 0 deletions

View file

@ -186,6 +186,9 @@
// OL/LI 태그를 위한 치환 처리
$content = preg_replace('!<(ol|ul|blockquote)>!is','<\\1 style="margin-left:40px;">',$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);
if($add_document_info) return sprintf('<!--BeforeDocument(%d,%d)-->%s<!--AfterDocument(%d,%d)-->', $this->document_srl, $this->get('member_srl'), $content, $this->document_srl, $this->get('member_srl'));