diff options
author | Andrew Dolgov <[email protected]> | 2009-12-16 20:55:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-12-16 20:55:49 +0300 |
commit | ba8cd9a76f39c7e1e6c9090fca299e5be931a607 (patch) | |
tree | 3d39890bc80a9dd3561e5114912fcdc9bce3d6ae /api | |
parent | c45ffc0c06a5af0ef52e6668188b00088e8616b2 (diff) |
api: getHeadlines - truncate article excerpt properly
Diffstat (limited to 'api')
-rw-r--r-- | api/index.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/api/index.php b/api/index.php index d6389a741..d3b5ff4fe 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); } |