mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 01:42:14 +09:00
#18591122 Document Summary 출력시 링크의 개행문자(-) 넣지 않음
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7111 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
98e87e09c7
commit
382c456be8
1 changed files with 9 additions and 1 deletions
|
|
@ -362,11 +362,19 @@
|
|||
$content = str_replace(array('<','>','"'),array('<','>','"'), $content);
|
||||
|
||||
// 영문이 연결될 경우 개행이 안 되는 문제를 해결
|
||||
$content = preg_replace('/([a-z0-9\+:\/\.\~,\|\!\@\#\$\%\^\&\*\(\)\_]){20}/is',"$0-",$content);
|
||||
$content = preg_replace_callback('/([a-z0-9\+:\/\.\~,\|\!\@\#\$\%\^\&\*\(\)\_]){20,}/is',array(&$this,'_summaryReplace'),$content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
function _summaryReplace($matches){
|
||||
if(preg_match('/http(s?):\/\//is',$matches[0])){
|
||||
return $matches[0];
|
||||
}else{
|
||||
return preg_replace('/(.){20}/is',"$0-",$matches[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function getRegdate($format = 'Y.m.d H:i:s') {
|
||||
return zdate($this->get('regdate'), $format);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue