From d190794c06440de91345d1dfbc0440dbe766e5e8 Mon Sep 17 00:00:00 2001 From: "joe.lapp" Date: Thu, 15 Sep 2005 03:57:45 +0200 Subject: RSS entry description now starts at first paragraph darcs-hash:20050915015745-36b45-4325cadc4e66b9343b148beed306b69833166246.gz --- feed.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'feed.php') diff --git a/feed.php b/feed.php index b655cd292..537ae5e88 100644 --- a/feed.php +++ b/feed.php @@ -174,6 +174,11 @@ function rssListNamespace(&$rss,$ns){ * @author Andreas Gohr */ function cleanDesc($desc){ + //start description at text of first paragraph + $matches = array(); + if(preg_match('/

|/', $desc, $matches, PREG_OFFSET_CAPTURE)) + $desc = substr($desc, $matches[0][1]); + //remove TOC $desc = preg_replace('!

.*?(
\n)!s','',$desc); $desc = strip_tags($desc); -- cgit v1.2.3