aboutsummaryrefslogtreecommitdiffstats
path: root/src/ical.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ical.c')
-rw-r--r--src/ical.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ical.c b/src/ical.c
index 0aa5da7..d953b0e 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -843,13 +843,19 @@ static char *ical_read_summary(char *line)
{
char *p, *summary;
- if ((p = strchr(line, ':')) != NULL) {
- p++;
- summary = ical_unformat_line(p);
- return summary;
- } else {
+ p = strchr(line, ':');
+ if (!p)
return NULL;
- }
+
+ summary = ical_unformat_line(p + 1);
+ if (!summary)
+ return NULL;
+
+ /* Event summaries must not contain newlines. */
+ for (p = strchr(summary, '\n'); p; p = strchr(p, '\n'))
+ *p = ' ';
+
+ return summary;
}
static void