-
Notifications
You must be signed in to change notification settings - Fork 162
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
Description line length should not be longer than 75 characters warning in validator #630
Comments
Which description are you talking about? Can you provide a working example that produces this invalid ical? Usually this function should fold everything |
@sebbo2002 I managed to reproduce the error: cal.createEvent({
start: dtStart,
end: dtEnd,
location: "Default location",
summary: "Test summary",
description:
"This is a large description with an appointment at Mart's place https://example.com/calendar/item/important-item-219384 which is not truncated correctly",
status: "CONFIRMED",
}); Gives:
The first line is 79 characters long. Probably because of the apostrophe is escaped as 5 characters instead of 1. |
Okay, that escaping confuses me to be honest. Probably the same issue you have in #629. When I try you example it works completely fine with the current version: import ical from 'ical-generator'
const cal = ical();
const dtStart = new Date();
const dtEnd = new Date();
cal.createEvent({
start: dtStart,
end: dtEnd,
location: "Default location",
summary: "Test summary",
description:
"This is a large description with an appointment at Mart's place https://example.com/calendar/item/important-item-219384 which is not truncated correctly",
status: "CONFIRMED",
});
cal.toString();
Are you using the current ical-generator version v8.0.1 or maybe some old, unfixed version? Is there some code in between that may add that html encoding? Because neither |
I am using 11ty and it turned out to escape the output. Thank you so much for your help! |
When I set a large text as description, I get:
https://icalendar.org/iCalendar-RFC-5545/3-1-content-lines.html describes that lines should be broken into pieces of 75 chars.
Before using this library I did it manually with this function. Which might be useful:
The text was updated successfully, but these errors were encountered: