#18591122 Document Summary 출력시 링크의 개행문자(-) 넣지 않음

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7111 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2010-01-05 02:42:35 +00:00
parent 98e87e09c7
commit 382c456be8

View file

@ -362,11 +362,19 @@
$content = str_replace(array('<','>','"'),array('&lt;','&gt;','&quot;'), $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);
}