aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud/web/data_process.js
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-08-12 10:11:29 -0400
committerB. Stack <bgstack15@gmail.com>2022-08-12 10:11:29 -0400
commitc0d9b3a037bc7574f9d8a81a273e74223a85f6f9 (patch)
tree3935ef685d1a0d9d2522945c2f3406daa2833926 /radicale_infcloud/web/data_process.js
parentrestore putVcalendarToCollection, hide dl button (diff)
downloadradicaleinfcloud-c0d9b3a037bc7574f9d8a81a273e74223a85f6f9.tar.gz
radicaleinfcloud-c0d9b3a037bc7574f9d8a81a273e74223a85f6f9.tar.bz2
radicaleinfcloud-c0d9b3a037bc7574f9d8a81a273e74223a85f6f9.zip
move line-endings fix to forms.js
By moving the line-endings fix to this one source location of fileContents, we avoid having to modify multiple places where the input is parsed.
Diffstat (limited to 'radicale_infcloud/web/data_process.js')
-rw-r--r--radicale_infcloud/web/data_process.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/radicale_infcloud/web/data_process.js b/radicale_infcloud/web/data_process.js
index 0e0df93..7f866ed 100644
--- a/radicale_infcloud/web/data_process.js
+++ b/radicale_infcloud/web/data_process.js
@@ -761,9 +761,7 @@ function getvCalendarstart(inputEvent)
{
var vcalendar_element='',
itsOK=false;
- // stackrpms,3 Handle not-to-spec upload of .ics file
- // By adjusting line endings, this function can process the fileContents and make it visible on the current view.
- var vEvent=inputEvent.vcalendar.replace(/\r*\n+/gm,'\r\n');
+ var vEvent=inputEvent.vcalendar;
if(vEvent.match(vCalendar.pre['vcalendar']))
{
vcalendar_element=vEvent.match(vCalendar.pre['beginVTODO']);
@@ -2551,9 +2549,6 @@ function fullVcalendarToData(inputEvent)
if(!vcalendar)
return false;
- // stackrpms,3 Handle not-to-spec upload of .ics file
- // By adjusting the line endings, we can now immediately edit newly-imported events.
- vcalendar = vcalendar.replace(/\r*\n+/gm,'\r\n');
var vcalendar_full=vcalendar.split('\r\n');
if((parsed=('\r\n'+vcalendar_full[0]+'\r\n').match(vCalendar.pre['contentline_parse']))==null)
@@ -3539,9 +3534,6 @@ function getDateFromDay(objComponent, t, disableRecursion,uid)
vcalendar=vcalendar.replace(vcalendar_element[0],'');
*/
var recurrence_id_array=new Array();
- // stackrpms,3 Handle not-to-spec upload of .ics file
- // By adjusting line endings, this function can process the fileContents and make it visible on the current view.
- 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')
@@ -7888,7 +7880,6 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew)
var recurrence_id_array=new Array();
/* matching for BEGIN:VEVENT */
- 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')
bgstack15