• Resolved lhaverkamp

    (@lhaverkamp)


    The Add to Calendar Links should urlencode the cid parameter that is passed. If the ical links use query parameters themselves, these are effectively being lost when the URI is constructed.

    To resolve this problem, I modified line 786 of amr-pluggable.php to the following by adding urlencode(…) for the cid parameter.

    '<a class= "amr-bling addtogoogle" href="https://www.google.com/calendar/render?cid='.urlencode(html_entity_decode($cal)).'" target="_blank" title="'.$text1.'">'.$text2.'</a>');

    I ran into this situation because on one of the WordPress sites I administrator, we happen to have ics links like:

    webcal://hopelutheran.ccbchurch.com/group_calendar.ics?id=75&tk=X99RCW3KYC9A6B3BPXQ2FM9J2XCBR67U

    and if the query parameters aren’t urlencoded before it’s passed to Google, then in the example above, Google will lose the &tk=<token> string and thus look like my calendar was imported, but alas no events show up since the tk parameter wasn’t passed.

    https://www.ads-software.com/plugins/amr-ical-events-list/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add_cal_to_google function missing urlencode’ is closed to new replies.