jasonsalzman / react-add-to-calendar

A simple, customizable, and reusable Add to Calendar button component for React
https://jasonsalzman.github.io/react-add-to-calendar/
MIT License
181 stars 123 forks source link

implement iCalendar / RFC 5545 specification to allow multi-line fields #41

Open cantremember opened 5 years ago

cantremember commented 5 years ago

the iCalendar format produced by this Component does not conform to the RFC 5545 specification with regards to line "folding" and line break escapement

3.1. Content Lines

Lines of text SHOULD NOT be longer than 75 octets, excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique.

3.3.11. Text

An intentional formatted text line break MUST only be included in a "TEXT" property value by representing the line break with the character sequence of BACKSLASH, followed by a LATIN SMALL LETTER N or a LATIN CAPITAL LETTER N, that is "\n" or "\N".

as a result, if you provide a multi-line { description },

jagannath7775 commented 4 years ago

hi, I am trying to add multiline description in calendar like

              <AddToCalendar
                      listItems={[
                        { apple: "Apple Calendar" },
                        { google: "Google" },
                        { outlook: "Outlook" }
                      ]}
                      event={{
                        title:"Event Tiltle",
                        description: "description line 1\n description line2",
                        location: "address here",
                        startTime: "dateHere",
                        endTime: "dateHere"
                      }}
              />

but here in description not getting descrption line 2 in case of icalendar. In case of google calendar it is working fine