Commit 2d46a933 authored by Andi Sidwell's avatar Andi Sidwell
Browse files

Add failing test for CRLF line breaks

parent 8dbe43f8
......@@ -789,6 +789,18 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
event.summary('Example Event II');
assert.ok(str !== cal.toString());
});
it('should escape CR/CRLF line breaks', function() {
var cal = ical(),
event = cal.createEvent({
start: new Date(),
end: new Date(new Date().getTime() + 3600000),
summary: 'Example with a\rlinebreak'
}),
str = cal.toString();
assert.equal(str.indexOf('\rlinebreak'), -1);
});
});
describe('location()', function() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment