summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-07-25 12:36:04 +0200
committerGravatar default2023-07-25 12:36:04 +0200
commitede2a38b2bb98b34ac44dcd6ed8710a25fe09990 (patch)
tree9037ea8e22839849d79798f57549ba0e2acddfcc
parentSimplified attachment iteration in HTML rendering. (diff)
downloadsnac2-ede2a38b2bb98b34ac44dcd6ed8710a25fe09990.tar.gz
snac2-ede2a38b2bb98b34ac44dcd6ed8710a25fe09990.tar.xz
snac2-ede2a38b2bb98b34ac44dcd6ed8710a25fe09990.zip
If an image has no description, try the post 'name' field.
-rw-r--r--html.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/html.c b/html.c
index 4f7f982..976a244 100644
--- a/html.c
+++ b/html.c
@@ -1194,6 +1194,8 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
1194 1194
1195 const char *name = xs_dict_get(v, "name"); 1195 const char *name = xs_dict_get(v, "name");
1196 if (xs_is_null(name)) 1196 if (xs_is_null(name))
1197 name = xs_dict_get(msg, "name");
1198 if (xs_is_null(name))
1197 name = L("No description"); 1199 name = L("No description");
1198 1200
1199 xs *es1 = encode_html(name); 1201 xs *es1 = encode_html(name);