emersion / emersion/go-ical

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

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
72
Forks
19
PR merge metrics
No merged PRs in 30d

Description

In line of our earlier [discussion](https://github.com/emersion/go-ical/issues/6), 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:

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.