Bug 1783441 - Remove X-LIC-ERROR handling in CalIcsParser.parseString. r=#thunderbird-reviewers,darktrojan
I'm not 100% sure what the purpose of these checks are but I beleive X-LIC-ERROR is a libical specific thing.
Calling toString() on an icaljs freebusy property seems to mess up the formatting of the period string.
Geoff tracked the cause down to here:
https://searchfox.org/comm-central/rev/f57827565398fe6be1969d5107050822b5f2444f/calendar/base/modules/Ical.jsm#856-868
Not calling toString() while checking for X-LIC-ERROR avoids the problem though. Note that the check is not done in the
async branch of parseString().
Differential Revision:
https://phabricator.services.mozilla.com/D154571
--- a/calendar/base/src/CalIcsParser.jsm
+++ b/calendar/base/src/CalIcsParser.jsm
@@ -147,27 +147,16 @@ CalIcsParser.prototype = {
cal.ERROR("Error Parsing ICS: " + rc);
aAsyncParsing.onParsingComplete(rc, self);
}
},
});
} else {
try {
let icalComp = cal.icsService.parseICS(aICSString, aTzProvider);
- // There is no such indicator like X-LIC in icaljs, so there would need to
- // detect and log such errors already within the parser. However, until
- // X-LIC or libical will be removed we make use of X-LIC-ERRORS here but
- // don't add something similar to icaljs
- if (icalComp.toString().match(/X-LIC-ERROR/)) {
- cal.WARN(
- "Parsing failed for parts of the item (while this is considered " +
- "to be a minor issue, we continue processing the item):\n" +
- icalComp.toString()
- );
- }
this.processIcalComponent(icalComp);
} catch (exc) {
cal.ERROR(exc.message + " when parsing\n" + aICSString);
}
}
},
parseFromStream(aStream, aTzProvider, aAsyncParsing) {