aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--radicale_infcloud/web/data_process.js5
-rw-r--r--radicale_infcloud/web/interface.js1
2 files changed, 4 insertions, 2 deletions
diff --git a/radicale_infcloud/web/data_process.js b/radicale_infcloud/web/data_process.js
index 3862e73..05892e8 100644
--- a/radicale_infcloud/web/data_process.js
+++ b/radicale_infcloud/web/data_process.js
@@ -761,7 +761,7 @@ function getvCalendarstart(inputEvent)
{
var vcalendar_element='',
itsOK=false;
- var vEvent=inputEvent.vcalendar;
+ var vEvent=inputEvent.vcalendar.replace(/\r*\n+/gm,'\r\n');
if(vEvent.match(vCalendar.pre['vcalendar']))
{
vcalendar_element=vEvent.match(vCalendar.pre['beginVTODO']);
@@ -7888,7 +7888,8 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew)
var recurrence_id_array=new Array();
/* FINDTHIS matching for BEGIN:VEVENT */
// this one works, but has 3 replace calls!
- vcalendarOrig = vcalendarOrig.replace(/^\n/gm,'').replace('\n','\r\n').replace(/\r*\n/gm,'\r\n');
+ //vcalendarOrig = vcalendarOrig.replace(/^\n/gm,'').replace('\n','\r\n').replace(/\r*\n/gm,'\r\n');
+ vcalendarOrig = vcalendarOrig.replace(/\r*\n+/gm,'\r\n');
while(vcalendarOrig.match(vCalendar.pre['vevent'])!=null)
{
if(vcalendarOrig.substring(vcalendarOrig.indexOf('BEGIN:VEVENT')-2, vcalendarOrig.indexOf('BEGIN:VEVENT'))=='\r\n')
diff --git a/radicale_infcloud/web/interface.js b/radicale_infcloud/web/interface.js
index 7f9b06f..8ea4777 100644
--- a/radicale_infcloud/web/interface.js
+++ b/radicale_infcloud/web/interface.js
@@ -1330,6 +1330,7 @@ function uploadFile(fileContents)
// When returnFullUID is true (last parameter), it returns "http://username@server/radicale/username/CALID/hex.ics"
// But unfortunately the globalEventList.events[rid] still does not populate with this.
//newEvent.id = inputUID + newUID + ".ics";
+ newEvent.vcalendar = newEvent.vcalendar.replace(/\r*\n+/gm,'\r\n');
newEvent.id = putVcalendarToCollection(coll.accountUID, inputUID, "", fileContents, "", 'vevent', false, false, "", true);
console.log("FINDTHIS");
return newEvent;
bgstack15