diff options
Diffstat (limited to 'radicale_infcloud/web/forms.js')
-rw-r--r-- | radicale_infcloud/web/forms.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/radicale_infcloud/web/forms.js b/radicale_infcloud/web/forms.js index ab38864..1f148fe 100644 --- a/radicale_infcloud/web/forms.js +++ b/radicale_infcloud/web/forms.js @@ -54,7 +54,8 @@ function dropHandler(event) { reader.readAsText(f); reader.onload = function(){ //if(window.console){console.log(reader.result)}; - uploadFile(reader.result); + // Fixing the newlines here prevents having to duplicate the effort multiple times in various places! + uploadFile(reader.result.replace(/\r*\n+/gm,'\r\n')); }; reader.onerror = function(){if(window.console){console.log(reader.error)}}; } |