webcalendar
webcalendar copied to clipboard
Description of events imported from Remote Calendars incorrect
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
- the imported .ics file already encoded with utf8 , so decode no require here
- 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'] );