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:
parent
84d66979a4
commit
4fb0205945
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user