April 08, 2005
Thanks to a comment by jayaram I discovered a bug with the way Atom feeds from Blogger.com feeds (maybe others) where handled (always displayed as full entries and full HTML). It seems like an obvious goof!
if ($item['summary']) {
$my_blurb = $item['summary'];
// strip html
if ($html != 'a') $my_blurb = strip_tags($my_blurb);
// trim descriptions
if ($desc > 1) {
// display specified substring numbers of chars;
// html is stripped to prevent cut off tags
$my_blurb = substr($my_blurb, 0, $desc) . '...';
}
} else { // Atom support (thanks David Carter-Tod)
$my_blurb = $item['content']['encoded'];
}
to read:
if ($item['summary']) {
$my_blurb = $item['summary'];
} else { // Atom support (thanks David Carter-Tod)
$my_blurb = $item['content']['encoded'];
}
// strip html
if ($html != 'a') $my_blurb = strip_tags($my_blurb);
// trim descriptions
if ($desc > 1) {
// display specified substring numbers of chars;
// html is stripped to prevent cut off tags
$my_blurb = substr($my_blurb, 0, $desc) . '...';
}