Merge pull request #1221 from sejin7940/getSummary

줄바꿈 처리되어있는 경우 getSummary 추출 오류 수정
This commit is contained in:
bnu 2015-03-19 15:43:51 +09:00
commit 80ae13a6c2

View file

@ -524,6 +524,8 @@ class documentItem extends Object
function getSummary($str_size = 50, $tail = '...')
{
$content = $this->getContent(FALSE, FALSE);
$content = nl2br($content);
// For a newlink, inert a whitespace
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);