Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line feeds from Outlook break Thunderbird .ics export #262

Open
UweGrensing opened this issue Apr 22, 2024 · 1 comment
Open

Line feeds from Outlook break Thunderbird .ics export #262

UweGrensing opened this issue Apr 22, 2024 · 1 comment

Comments

@UweGrensing
Copy link

Your environment

TbSync version: 4.8
EAS-4-TbSync version: 4.8
Thunderbird version: 115.10.1

Expected behavior

In Thunderbird calendar events, line feeds (e.g. in descriptions) should be \n only, so .ics-Export works correctly as for internally generated events.

Actual behavior

Line feeds from Outlook are taken over as \r\n, so .ics-Export treats \n correctly but ignores \r which leads to broken folding and invalid .ics-Files. Events created from thunderbird as .ics files are never supposed to contain \r, so EAS-4-TbSync should actually filter them out before passing strings to thunderbird.

Steps to reproduce

Create an event in Outlook containing one or multiple line feeds in the description. Sync to thunderbird, copy the event into the clipboard and paste into text editor.
The result will be an incorrectly formatted .ics-File where the \n from the line feed will be in column 0 instead of column 3.
(e.g.
DESCRIPTION:
\n
\nTest Event with linefeed

instead of correct:
DESCRIPTION: \n\nTest Event with linefeed
)

To help resolving your issue, enable debug logging (TbSync Account Manager -> Help) and send me the debug.log via e-mail (use the title of your issue as subject of the email).

@UweGrensing
Copy link
Author

This fixes it for me - in file content/includes/xmltools.js:

@ -15,7 +15,7 @@ var xmltools = {
    },
        
    checkString : function(d, fallback = "") {
-        if (this.isString(d)) return d;
+        if (this.isString(d)) return d.replaceAll("\r\n","\n");
        else return fallback;
    },	    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant