summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/html.c b/html.c
index d29bb04..0eb68a8 100644
--- a/html.c
+++ b/html.c
@@ -1147,10 +1147,12 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
1147 /* not a list */ 1147 /* not a list */
1148 tag = xs_list_new(); 1148 tag = xs_list_new();
1149 tag = xs_list_append(tag, p); 1149 tag = xs_list_append(tag, p);
1150 } else {
1151 /* is a list */
1152 tag = xs_dup(p);
1153 } 1150 }
1151 else
1152 if (xs_type(p) == XSTYPE_LIST)
1153 tag = xs_dup(p);
1154 else
1155 tag = xs_list_new();
1154 1156
1155 xs_list *tags = tag; 1157 xs_list *tags = tag;
1156 1158
@@ -1291,7 +1293,10 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
1291 attach = xs_list_append(attach, v); 1293 attach = xs_list_append(attach, v);
1292 } 1294 }
1293 else 1295 else
1296 if (xs_type(v) == XSTYPE_LIST)
1294 attach = xs_dup(v); 1297 attach = xs_dup(v);
1298 else
1299 attach = xs_list_new();
1295 1300
1296 /* does the message have an image? */ 1301 /* does the message have an image? */
1297 if (xs_type(v = xs_dict_get(msg, "image")) == XSTYPE_DICT) { 1302 if (xs_type(v = xs_dict_get(msg, "image")) == XSTYPE_DICT) {