summaryrefslogtreecommitdiff
path: root/pith/mailview.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2017-12-22 22:31:48 -0700
committerEduardo Chappa <chappa@washington.edu>2017-12-22 22:31:48 -0700
commit29798bd68fc0b892fce0fe49ec8859485e3b531b (patch)
tree5f2d8f28fbaf5bc76a3fc01f9d589aad729ed0ee /pith/mailview.c
parent1c6f750f40551447f0ea214c993845238fd729cd (diff)
downloadalpine-29798bd68fc0b892fce0fe49ec8859485e3b531b.tar.xz
* Fix parsing of date for DTSTART and DTEND. The parser only recognized
DATE-TIME format, now it recognizes DATE format. Reported by Holger Trapp. * Add escape parser to event location (switch "\," to "," etc.) * Start work to support reply of invitations, but then I realize that I need to start work in sending event invitations before I do that, so I will.
Diffstat (limited to 'pith/mailview.c')
-rw-r--r--pith/mailview.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/pith/mailview.c b/pith/mailview.c
index 1d71e7a0..dcdd183d 100644
--- a/pith/mailview.c
+++ b/pith/mailview.c
@@ -312,6 +312,7 @@ format_calendar_vevent(VCALENDAR_S *vcal, ATTACH_S *a, HANDLE_S **handlesp, int
} /* end of if(organizer) */
if(vesy->location){
+ ical_remove_escapes(&vesy->location);
utf8_snprintf(tmp_20k_buf, SIZEOF_20KBUF, "%s%s%s",
padding, _("Location: "), vesy->location);
gf_puts(tmp_20k_buf, pc);
@@ -483,10 +484,25 @@ format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int w
for(a = ps_global->atmts; a->description != NULL; a++){
if(MIME_VCALENDAR(a->body->type, a->body->subtype)){
b = mail_body (ps_global->mail_stream, msgno, a->number);
+ if(b == NULL){
+ gf_puts(_("Error fetching calendar body part"), pc);
+ gf_puts(NEWLINE, pc);
+ continue;
+ }
if(b->sparep == NULL){
b64text = mail_fetch_body(ps_global->mail_stream, msgno, a->number, &callen, 0);
+ if(b64text == NULL){
+ gf_puts(_("Error fetching calendar text"), pc);
+ gf_puts(NEWLINE, pc);
+ continue;
+ }
b64text[callen] = '\0'; /* chop off cookie */
caltext = rfc822_base64(b64text, strlen(b64text), &callen);
+ if(caltext == NULL){
+ gf_puts(_("Error in calendar base64 encoding"), pc);
+ gf_puts(NEWLINE, pc);
+ continue;
+ }
vcal = ical_parse_text(caltext);
b->sparep = create_body_sparep(iCalType, (void *) vcal);
}