mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
글/댓글의 내용 자동 링크 기능 적용
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2735 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5bdad63b7f
commit
d58f1590dd
2 changed files with 9 additions and 0 deletions
|
|
@ -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'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue