diff. btwn <Description> and <content:encoded>
Posted: Thu Feb 17, 2005 5:33 pm
I have tried several RSS feeders, RSS 2.0 seemed to fail because there was no <description> section in my blog, because the mainBody of my blog has been placed under <content:encoded> in RSS 2.0. (RSS 1.0 does not do this, the mainBody is enclosed within <description>, no problem.)
I have traced the code to serendipity_rss_exchange.ics.php: (line 16-33:)
How do I swtich out the <content:encoded> back to <description>?
I don't read php very well, but I am intrigued by the similarity between the following lines:
$data .= utf8_decode($item['content:encoded']);
$data = utf8_decode($item['content:encoded']);
Could this be a problem?
I have traced the code to serendipity_rss_exchange.ics.php: (line 16-33:)
Code: Select all
if ($item['content:encoded']) {
if (!isset($entry['body']) || $bodyonly) {
$data = &$entry['body'];
} else {
$data = &$entry['extended'];
}
// See if the 'description' element is a substring of the 'content:encoded' part. If it is,
// we will only fetch the full 'content:encoded' part. If it's not a substring, we append
// the 'content:encoded' part to either body or extended entry (respecting the 'bodyonly'
// switch). We substract 4 letters because of possible '...' additions to an entry.
$testbody = substr(trim(strip_tags($entry['body'])), 0, -4);
if ($testbody != substr(trim(strip_tags($item['content:encoded'])), 0, strlen($testbody))) {
$data .= utf8_decode($item['content:encoded']);
} else {
$data = utf8_decode($item['content:encoded']);
}
}
I don't read php very well, but I am intrigued by the similarity between the following lines:
$data .= utf8_decode($item['content:encoded']);
$data = utf8_decode($item['content:encoded']);
Could this be a problem?