diff options
author | joe.lapp <joe.lapp@pobox.com> | 2005-09-15 03:57:45 +0200 |
---|---|---|
committer | joe.lapp <joe.lapp@pobox.com> | 2005-09-15 03:57:45 +0200 |
commit | d190794c06440de91345d1dfbc0440dbe766e5e8 (patch) | |
tree | 36c71bc075762954b7b697df2ac0b8857a2bee4f | |
parent | 03ee62cba5ae4e4f0ef7416c8a3813bc6a59d7c9 (diff) | |
download | rpg-d190794c06440de91345d1dfbc0440dbe766e5e8.tar.gz rpg-d190794c06440de91345d1dfbc0440dbe766e5e8.tar.bz2 |
RSS entry description now starts at first paragraph
darcs-hash:20050915015745-36b45-4325cadc4e66b9343b148beed306b69833166246.gz
-rw-r--r-- | feed.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |