1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 20:51:53 +02:00

news-summary auto-gen correction.

This commit is contained in:
Cameron 2013-11-03 20:11:05 -08:00
parent b9353e8a17
commit d4de0a4af9

View File

@ -291,7 +291,9 @@ class news_shortcodes extends e_shortcode
if($this->news_item['news_body']) // Auto-generate from first 2 sentences of news-body. //TODO Add Pref?
{
$tp = e107::getParser();
$text = strip_tags($tp->toHtml($this->news_item['news_body'],true));
$text = $tp->toHtml($this->news_item['news_body'],true);
$text = str_replace("<br />"," ",$text);
$text = strip_tags($text);
$tmp = preg_split('/\.\s/i', trim($text));
if($tmp[0] && $tmp[1])