diff options
| author | 2023-07-25 12:36:04 +0200 | |
|---|---|---|
| committer | 2023-07-25 12:36:04 +0200 | |
| commit | ede2a38b2bb98b34ac44dcd6ed8710a25fe09990 (patch) | |
| tree | 9037ea8e22839849d79798f57549ba0e2acddfcc | |
| parent | Simplified attachment iteration in HTML rendering. (diff) | |
| download | snac2-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -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); |