summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c2
-rw-r--r--html.c15
2 files changed, 16 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 4247078..212dd2f 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -239,7 +239,7 @@ xs_list *get_attachments(const xs_dict *msg)
239 if (xs_is_null(name)) 239 if (xs_is_null(name))
240 name = xs_dict_get(msg, "name"); 240 name = xs_dict_get(msg, "name");
241 if (xs_is_null(name)) 241 if (xs_is_null(name))
242 name = L("No description"); 242 name = "";
243 243
244 xs *d = xs_dict_new(); 244 xs *d = xs_dict_new();
245 d = xs_dict_append(d, "type", type); 245 d = xs_dict_append(d, "type", type);
diff --git a/html.c b/html.c
index bacee5b..b50d69e 100644
--- a/html.c
+++ b/html.c
@@ -1891,6 +1891,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
1891 xs_html_tag("a", 1891 xs_html_tag("a",
1892 xs_html_attr("href", href), 1892 xs_html_attr("href", href),
1893 xs_html_text(href)))); 1893 xs_html_text(href))));
1894
1895 /* do not generate an Alt... */
1896 name = NULL;
1894 } 1897 }
1895 else { 1898 else {
1896 xs_html_add(content_attachments, 1899 xs_html_add(content_attachments,
@@ -1900,6 +1903,18 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
1900 xs_html_text(L("Attachment")), 1903 xs_html_text(L("Attachment")),
1901 xs_html_text(": "), 1904 xs_html_text(": "),
1902 xs_html_text(href)))); 1905 xs_html_text(href))));
1906
1907 /* do not generate an Alt... */
1908 name = NULL;
1909 }
1910
1911 if (name != NULL && *name) {
1912 xs_html_add(content_attachments,
1913 xs_html_tag("p",
1914 xs_html_tag("details",
1915 xs_html_tag("summary",
1916 xs_html_text(L("Alt..."))),
1917 xs_html_text(name))));
1903 } 1918 }
1904 } 1919 }
1905 } 1920 }