summaryrefslogtreecommitdiff
path: root/feed.php
diff options
context:
space:
mode:
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php5
1 files changed, 5 insertions, 0 deletions
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 <andi@splitbrain.org>
*/
function cleanDesc($desc){
+ //start description at text of first paragraph
+ $matches = array();
+ if(preg_match('/<p>|<p\s.*?>/', $desc, $matches, PREG_OFFSET_CAPTURE))
+ $desc = substr($desc, $matches[0][1]);
+
//remove TOC
$desc = preg_replace('!<div class="toc">.*?(</div>\n</div>)!s','',$desc);
$desc = strip_tags($desc);