]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: getHeadlines - truncate article excerpt properly
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 16 Dec 2009 17:55:49 +0000 (20:55 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 16 Dec 2009 17:55:49 +0000 (20:55 +0300)
api/index.php

index d6389a741a0801e82cb483a53f4d9107b3d5c017..d3b5ff4fe419429623770b2056e3ba1bbac00f3a 100644 (file)
                                                "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);
                        }