webcalendar icon indicating copy to clipboard operation
webcalendar copied to clipboard

Description of events imported from Remote Calendars incorrect

Open kingwap99 opened this issue 5 years ago • 0 comments

I just imported a Remote Calendars from http://h2o.tphcc.gov.tw/MainPortalAdmin/document/htmlCnt/201812171440273-2019_NewTaipeiCityLibrary_close_days.ics

but the Description of events can only shown ?????? I studied on the source code and made some change as below and it worked well for me.

I think there are two issues in inside

  1. the imported .ics file already encoded with utf8 , so decode no require here
  2. the empty() seems not working well at my server ( ubuntu 16.04, apache 2, php 7.0)

/include/xcal.php function format_ical

/* if ( empty ( $event['summary'] ) ) $event['summary'] = translate ( 'Unnamed Event' ); $fevent['Summary'] = utf8_decode ( $event['summary'] ); if ( ! empty ( $event['description'] ) ) { $fevent['Description'] = utf8_decode ( $event['description'] ); } else { $fevent['Description'] = $fevent['Summary']; } */

$fevent['Summary'] = ( $event['summary'] ); $fevent['Description'] = ( $event['description'] );

kingwap99 avatar Apr 04 '19 03:04 kingwap99