iCal Feed and HTML encoding

This topic contains 2 replies, has 2 voices, and was last updated by  José Morin 9 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15119

    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&#8216\;AMAP Gambetta\, hébergée au Stendhal\, fête sa premiè
     re année [&#8230\;]
    

    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
    #15133

    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
    #15214

    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
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.