From c8254789c5f30741bc064ff6556b4ec9ea407e36 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 22 Apr 2021 22:19:36 -0400 Subject: Fix handling groups in address lists --- html.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html.c b/html.c index c3b47fd..5104667 100644 --- a/html.c +++ b/html.c @@ -47,9 +47,10 @@ static char *htmlMailto(struct Address addr) { } static int htmlAddress(FILE *file, struct Address addr, bool comma) { - char *mailto = htmlMailto(addr); + char *mailto = NULL; const char *template; if (addr.host) { + mailto = htmlMailto(addr); template = Q([,][name]); } else if (addr.mailbox) { template = "[mailbox]: "; @@ -109,6 +110,7 @@ static char *htmlMbox(const char *messageID) { static int htmlReplyCc(FILE *file, bool first, struct AddressList list) { for (size_t i = 0; i < list.len; ++i) { + if (!list.addrs[i].mailbox || !list.addrs[i].host) continue; const char *template = "[,][mailbox]@[host]"; struct Variable vars[] = { { "mailbox", list.addrs[i].mailbox }, -- cgit 1.4.1