about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-04-22 22:19:36 -0400
committerJune McEnroe <june@causal.agency>2021-04-22 22:19:36 -0400
commitc8254789c5f30741bc064ff6556b4ec9ea407e36 (patch)
treeba397809d7fcd206c5e6b5025b3a94f621a429a6
parentOmit HTML nav from nested messages (diff)
downloadbubger-c8254789c5f30741bc064ff6556b4ec9ea407e36.tar.gz
bubger-c8254789c5f30741bc064ff6556b4ec9ea407e36.zip
Fix handling groups in address lists
Diffstat (limited to '')
-rw-r--r--html.c4
1 files changed, 3 insertions, 1 deletions
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([,]<a href="[mailto]">[name]</a>);
 	} 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 },