Hi,
There is a problem with my iCal feed and I’m not sure if it is a problem with wordpress or the event organiser plugin.
While generating the iCal feed, only few characters are encoded in HTML. Elipsis and single quotation mark are both converted, while letters with agrave and acute are not.
This cause a problem while importing the iCal feed on another website as well as Google Agenda since ellipsis and single quotation mark are not converted back from HTML encoding.
Here is a shortened description taken from the feed :
DESCRIPTION: L‘\;AMAP Gambetta\, hébergée au Stendhal\, fête sa premiè
re année […\;]
While it should be :
DESCRIPTION: L'AMAP Gambetta\, hébergée au Stendhal\, fête sa premiè
re année […]
The feed is located on this page: http://lestendhal.net/feed/eo-events/
What should I change to have a correct iCal feed that I can import in Google Agenda?
Thank you a lot for reading and maybe for answering.
José Morin
Hi José,
It appears that the plug-in is not decoding the HTML entities before escaping the description. (i.e. running html_decode_entities()
). The problem is not occurring for the accents simply because in the database, they haven’t been encoded.
This will be fixed in the next update of event organiser, but you can make the required edits to template/ical.php. Specifically on line ~106
$description = wp_strip_all_tags( get_the_excerpt() );
should be
$description = wp_strip_all_tags( html_entity_decode( get_the_excerpt() ) );
Stephen Harris
I’ve updated event organiser to the last version and it is now working like a charm.
Thank you a lot for the modification!
José Morin