1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Fix for missing punctuation on generated news-summary.

This commit is contained in:
Cameron 2016-07-07 16:39:59 -07:00
parent 84d66979a4
commit 4fb0205945

View File

@ -560,12 +560,12 @@ class news_shortcodes extends e_shortcode
$breaks = array('<br />','<br>');
$text = str_replace($breaks,"\n",$text);
$text = strip_tags($text);
$tmp = preg_split('/(\.\s|!|\r|\n|\?)/i', trim($text));
$tmp = preg_split('/(\.\s|!|\r|\n|\?)/i', trim($text), 2, PREG_SPLIT_DELIM_CAPTURE);
$tmp = array_filter($tmp);
if($tmp[0])
{
$text = trim($tmp[0]);
$text = trim($tmp[0]).trim($tmp[1]);
}
}