Closed wyantb closed 4 years ago
Hey @wyantb Feel free to put up a PR. However, I'll probably have time to take a look over the holiday, i.e. before Monday.
OK great! I've prototyped a fix locally and it now loads up fine in the macOS calendar app, just getting our QA guy to load it up in Outlook real quick before I send you a PR. Should be ready tomorrow no problem.
Apologies for the delay. This has been resolved by #37 and released in version 1.0.10, which is now available on NPM.
Bug report
Describe the bug
Newlines in ics files need to be escaped to be visible when viewed in MS outlook and similar ics file viewers ( https://stackoverflow.com/a/18328506 ). Right now, the HOC doesn't do anything special to escape
<br>
s or\n
s in input fields, which works great for google calendar invites, but won't show up in ics files. I'm guessing that a simple regex as part of https://github.com/jasonleibowitz/react-add-to-calendar-hoc/blob/master/lib/utils.js#L121 would do the trick in producing an ics file with newlines that ics file clients would accept and display properly.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
description
fieldExpected behavior
Newlines to appear in the description
Actual behavior
No newlines appear in the description
System information
Additional context
If my instinct about where the fix is needed here is correct, happy to put up a PR with a fix. Let me know. Thanks for your work!