Open
Conversation
f610be3 to
dc1ab69
Compare
…escaping logic for TEXT values.
…sure the values are normalized and escaped properly.
dc1ab69 to
db5728f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change(s)
What changed and why
The implementation of the IcsExporter class has been changed to do proper normalizing, escaping and line folding as specified in RFC 5545. I created functions to write content lines using the proper line endings and to do line folding for all content lines, not just descriptions.
Also there is a method added to write TEXT properties, which have additional escaping rules for newlines and characters like ',' and ';'.
Tests performed
I did some tests with long lines, line breaks and characters like , and ; which should be escaped in the output.
For example a to-do with a long title and a long description:
Before
After
I used https://icalendar.org/validator.html to validate the results.
Closes the following issue(s)
Checklist
CHANGELOG.md(if applicable).