nwcell / ics.js

A browser firendly VCS file generator written entirely in javascript!!!!!!
MIT License
620 stars 258 forks source link

Wrong line separator #35

Open gabsoftware opened 7 years ago

gabsoftware commented 7 years ago

In the RFC for iCalendar it is required that the line ending is CR LF (\r\n), it should never be LF alone (\n).

asr1 commented 7 years ago

This enhancement would help with the Safari compatibility as described in #27 and #13. For full Safari support, the library would need to:

nwcell commented 7 years ago

Right now it's set to make \r\n for windows only. Can someone confirm if that's the desired behavior for all other calendars the consume the ics format?

https://github.com/nwcell/ics.js/blob/master/ics.js#L15

gabsoftware commented 7 years ago

According to RFC 5545, section 3.1. "Content Lines", the line separator must be CRLF with no exception, never LF or CR alone.