#1171: Calendar ICS import and export handle the description field

This commit is contained in:
Fabrice Mouhartem 2023-10-19 10:50:47 +02:00 committed by Fabrice Mouhartem
parent bbb4a46e0f
commit 398df9d58f

View File

@ -97,7 +97,6 @@ define([
};
var addEvent = function (arr, data, recId) {
var uid = data.id;
var dt = getDT(data);
@ -105,6 +104,10 @@ define([
var end = dt.end;
var rrule = getRRule(data);
var escapeValue = function(str) {
return str.replace(/\n/g, ["\\n"]);
}
Array.prototype.push.apply(arr, [
'BEGIN:VEVENT',
'DTSTAMP:'+getICSDate(+new Date()),
@ -115,6 +118,7 @@ define([
rrule,
'SUMMARY:'+ data.title,
'LOCATION:'+ data.location,
'DESCRIPTION:' + escapeValue(data.description),
].filter(Boolean));
if (Array.isArray(data.reminders)) {
@ -355,6 +359,7 @@ define([
category: 'time',
title: ev.getFirstPropertyValue('summary'),
location: ev.getFirstPropertyValue('location'),
description: ev.getFirstPropertyValue('description'),
isAllDay: isAllDay,
start: start,
end: end,