mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Fix for missing punctuation on generated news-summary.
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user