Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #33 newlines and escape chars formatting and parsing #36

Merged
merged 2 commits into from
May 7, 2020

Conversation

iammatis
Copy link
Owner

@iammatis iammatis commented May 6, 2020

According to section 3.3.11 of the RFC 5545 TEXT property can contain characters that need to be escaped.

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".

The "TEXT" property values may also contain special characters that are used to signify delimiters, such as a COMMA character for lists of values or a SEMICOLON character for structured values. In order to support the inclusion of these special characters in "TEXT" property values, they MUST be escaped with a BACKSLASH character. A BACKSLASH character in a "TEXT" property value MUST be escaped with another BACKSLASH character. A COMMA character in a "TEXT" property value MUST be escaped with a BACKSLASH character. A SEMICOLON character in a "TEXT" property value MUST be escaped with a BACKSLASH character. However, a COLON character in a "TEXT" property value SHALL NOT be escaped with a BACKSLASH character.

This PR attempts to fix an issue where such characters where not correctly parsed nor formatted.

@iammatis iammatis self-assigned this May 6, 2020
@iammatis
Copy link
Owner Author

iammatis commented May 6, 2020

Also should fix #27

This was linked to issues May 7, 2020
@iammatis iammatis merged commit 9bf50bd into develop May 7, 2020
@iammatis iammatis deleted the issue-33 branch May 7, 2020 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New lines in TEXT Resolve EOL mystery 🧙‍♂️
1 participant