From: Andrew Dolgov Date: Wed, 16 Dec 2009 17:55:49 +0000 (+0300) Subject: api: getHeadlines - truncate article excerpt properly X-Git-Tag: 1.4.0~179 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ba8cd9a76f39c7e1e6c9090fca299e5be931a607;p=tt-rss.git api: getHeadlines - truncate article excerpt properly --- diff --git a/api/index.php b/api/index.php index d6389a74..d3b5ff4f 100644 --- a/api/index.php +++ b/api/index.php @@ -231,7 +231,10 @@ "feed_id" => $line["feed_id"], ); - if ($show_except) $headline_row["excerpt"] = $line["content_preview"]; + if ($show_except) { + $excerpt = truncate_string(strip_tags($line["content_preview"]), 100); + $headline_row["excerpt"] = $excerpt; + } array_push($headlines, $headline_row); }