go-ical icon indicating copy to clipboard operation
go-ical copied to clipboard

Properties defined with Props.Set() aren't escaped

Open Dynom opened this issue 4 years ago • 0 comments

In line of our earlier discussion, escaping should happen without the user having to think about it. At the moment this isn't yet the case. The following two pieces of code have a different result:

e.Props.Set(&ical.Prop{
	Name:  ical.PropDescription,
	Value: `Hello world!\n-:-;`,
})
// produces: Hello world!\n-:-;
e.Props.SetText(ical.PropDescription, `Hello world!\n-:-;`)
// produces: Hello world!\\n-:-\;

Dynom avatar Jan 11 '21 15:01 Dynom