Closed Bug 233322 Opened 21 years ago Closed 21 years ago

MozCal .ics files have extra whitespace / linefeeds compared to RFC 2445

Categories

(Calendar :: General, defect)

x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bryce2, Assigned: mostafah)

References

()

Details

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

I have a small parser for .ics files, that I believe follows the rules of RFC
2445.  But it fails on Mozilla .ics files.  My parser expects each content line
to have just a single CRLF, per the standard:

    contentline        = name *(";" param ) ":" value CRLF
        ; This ABNF is just a general definition for an initial parsing
        ; of the content line into its property name, parameter list,
        ; and value string

But Mozilla seems to "prety print" the contents of .ics files, breaking each
line up:

BEGIN:VCALENDAR^M
VERSION^M
 :2.0^M
PRODID^M
 :-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN^M
BEGIN:VEVENT^M
UID^M
 :aa62d8b0-586d-11d8-a128-d747b3f39228^M
SUMMARY^M
 :Coast-to-Coast Bike Tour^M
DESCRIPTION^M
 :Sponsored by the Orleans Bikeways Committee\, this fourth annual ^M
 five-mile ride goes from Skaket Beach on the Bay to Nauset Beach on ^M
 the Atlantic. It has been a local event attracting young families ^M
 as well as older riders.^M


Whazzup?!  Parsing it the both ways is considerably harder.

Reproducible: Always
Steps to Reproduce:
.

Actual Results:  
.

Expected Results:  
.
Ahah.  Turns out Mozilla is folding the lines per the standard.  Still more
awkward to parse than other programs, but legal:

; When parsing a content line, folded lines MUST first
        ; be unfolded according to the unfolding procedure
        ; described above. When generating a content line, lines
        ; longer than 75 octets SHOULD be folded according to
        ; the folding procedure described above.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
The line folding breaks interoperability with current releases of Apple iCal (1.5.2 (v638)). Having the 
two main iCalendar implementations interoperate x-platform is FAR more important than strict 
adherrence to the RFC IMHO. At least allow a pref somewhere so we can share calendars again!
My mistake, there seems to be some other problem preventing interoperability. I'll submit a separate 
bug with the offending .ics file
The bugspam monkeys have been set free and are feeding on Calendar :: General. Be afraid for your sanity!
QA Contact: gurganbl → general
You need to log in before you can comment on or make changes to this bug.