Page 1 of 1
Invalid RSS-Feed from MyCalendar plugin
Posted: Sun Jan 16, 2011 6:34 pm
by gegenglueck
I'm using Serendipity 1.5.5 (PHP 5.2.12-nmm2), MyCalendar plugin, vers. 0.13., for a blog at
http://gegenglueck.org (calender at top of left menubar)
The following link works for displaying on the page:
http://kampnagel.de/index.php?page=deta ... ter=657814
but messes up the feed (the entry isn't visible in FF but still in source):
http://gegenglueck.org/plugin/mycalendar.rss
My feedreader (
http://rsslounge.aditu.de/) also complains:
* gegenglueck - Mein Kalender
* XML error: EntityRef: expecting ';' at line 26, column 60
Probably the reason is the ampersand within the link - any idea what todo about it?
Re: Invalid RSS-Feed from MyCalendar plugin
Posted: Mon Jan 17, 2011 2:04 pm
by garvinhicking
Hi!
XML is not forgiving for XHTML formatting errors. Specifically:
kampnagel.de/index.php?page=detail&cluster=657814
is not valid, you need to use:
kampnagel.de/index.php?page=detail&cluster=657814
Does that help?
Regards,
Garvin
Re: Invalid RSS-Feed from MyCalendar plugin
Posted: Tue Jan 18, 2011 2:58 pm
by gegenglueck
Moin Garvin,
I've tried it before (and again right now, if you want to test), but than it's a slightly different problem: The feed as such and the link in feed title is valid, but the link in the sidebar and in feed body is wrong / not working with the modified ampersand.
For just this single case, I wouldn't mind, but as an ampersand in links is quite common (like for links to this post), it's a more general issue with the plugin. I'm willing to help with testing or modifying my site, but unfortunately my coding abilities are limited.
Regards,
gegenglueck
Re: Invalid RSS-Feed from MyCalendar plugin
Posted: Wed Jan 19, 2011 8:00 pm
by garvinhicking
Hi!
Ah, of course you're right. Now I see the issue.
Can you edit your serendipity_event_mycalender.php file? Search for this code:
Code: Select all
<item>
<title><?php echo serendipity_utf8_encode($item['title']); ?></title>
<link><?php echo serendipity_utf8_encode($item['url']); ?></link>
<author><?php echo $serendipity['blogTitle']; ?></author>
<content:encoded>
<?php echo serendipity_utf8_encode(htmlspecialchars($item['content'])); ?>
</content:encoded>
<pubDate><?php echo $item['date']; ?></pubDate>
<guid isPermaLink="false"><?php echo serendipity_utf8_encode($item['url']); ?></guid>
</item>
and replace that with:
Code: Select all
<item>
<title><?php echo serendipity_utf8_encode(htmlspecialchars($item['title'])); ?></title>
<link><?php echo serendipity_utf8_encode(htmlspecialchars($item['url'])); ?></link>
<author><?php echo $serendipity['blogTitle']; ?></author>
<content:encoded>
<?php echo serendipity_utf8_encode(htmlspecialchars($item['content'])); ?>
</content:encoded>
<pubDate><?php echo $item['date']; ?></pubDate>
<guid isPermaLink="false"><?php echo serendipity_utf8_encode(htmlspecialchars($item['url'])); ?></guid>
</item>
This adds htmlspecialchars() to important place - please tell me if it works then, and you can keep the "native" & in your links
Regards,
Garvin
Re: Invalid RSS-Feed from MyCalendar plugin
Posted: Thu Jan 20, 2011 9:12 pm
by gegenglueck
I've done what you told me and - tataa - all links in the sidebar and the feed (title and body) are working fine. So from my point of view the issue seems to be solved/fixed.
Thanks a lot (and not only for the fix, the whole software is great),
gegenglueck