• Resolved Jussi Hattara

    (@jhattara)


    Repost of this: https://www.ads-software.com/support/topic/event-links-stripped-from-body-when-exporting-to-outlook-to-outlook-365/

    We noticed that exporting an event into Outlook 365 or Outlook Live stripped the links from content. In Google Calendar export those work correctly. I tested that just adding a/href tags into the body of the event worked, so there should be no technical limitations why links should be stripped from Outlook export links.

    I think the problem is in the method?generate_outlook_add_url_parameters()?within the file?the-events-calendar/src/Tribe/Views/V2/iCalendar/Traits/Outlook_Methods.php?that uses?strip_tags()?function to remove any HTML tags, including?<a href="">?links, from the export links into Outlook 365.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @jhattara ,

    Thank you for reaching out, and sharing the information.

    Did the following code snippet helped with the situation?

    Main events calendar:

    add_filter( 'tribe_ical_feed_item', 'tec_allow_html_tags_ics_description', 10, 2 ) ;function tec_allow_html_tags_ics_description( $item, $event_post ) { $before_content = "X-ALT-DESC;FMTTYPE=text/html:<!doctype html><html><body>"; $content = $buffer = str_replace(array("\r", "\n"), '', $event_post->post_content); $after_content = "</body></html>";  $item['DESCRIPTION'] .= "\n" . $before_content . $content . $after_content; return $item;}

    Single events:

    add_filter( 'tec_events_ical_outlook_single_event_import_url', function ( $url, $base_url, $params ) {	$event = tribe_get_event();	if ( $event && tribe_is_event( $event ) ) {		$params['body'] = urlencode( $event->post_content );		$url            = add_query_arg( $params, $base_url );	}	return $url;}, 10, 3 );
    Plugin Support Darian

    (@d0153)

    Hi there,

    It appears that we haven’t heard back from you in a while, so I’ll assume that the matter has been resolved. If you need any more help, feel free to start a new thread and we’ll be happy to assist you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.