summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2022-03-13 18:12:26 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2022-03-19 20:21:09 -0400
commitec38714bbc81c765990bcab2f6c3772e54eb2c75 (patch)
tree725fffb17fdc824475762d9f4097d10eb48295b6 /src
parent01ad848628b91461a831e5725c6e416bae76b930 (diff)
downloadcalcurse-ec38714bbc81c765990bcab2f6c3772e54eb2c75.tar.gz
calcurse-ec38714bbc81c765990bcab2f6c3772e54eb2c75.zip
Allow newlines in SUMMARY by replacing them with blanks
Addresses Github issue #414 (Android calendar allows them). Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src')
-rw-r--r--src/ical.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ical.c b/src/ical.c
index 64368e3..535bca8 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -1331,12 +1331,9 @@ static char *ical_read_summary(char *line, unsigned *noskipped,
}
/* An event summary is one line only. */
- if (strchr(summary, '\n')) {
- ical_log(log, item_type, itemline, _("line break in summary."));
- (*noskipped)++;
- mem_free(summary);
- summary = NULL;
- }
+ for (p = summary; *p; p++)
+ if (*p == '\n')
+ *p = ' ';
leave:
return summary;
}