commit 32b7fa2

default  ·  2025-04-10 06:25:35 +0000 UTC
parent 6f884e0
Shorten link label in Attachments.
1 files changed,  +7, -1
M html.c
M html.c
+7, -1
 1@@ -2439,13 +2439,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
 2                 name = NULL;
 3             }
 4             else {
 5+                xs *d_href = xs_dup(o_href);
 6+                if (strlen(d_href) > 64) {
 7+                    d_href[64] = '\0';
 8+                    d_href = xs_str_cat(d_href, "...");
 9+                }
10+
11                 xs_html_add(content_attachments,
12                     xs_html_tag("p",
13                         xs_html_tag("a",
14                             xs_html_attr("href", o_href),
15                             xs_html_text(L("Attachment")),
16                             xs_html_text(": "),
17-                            xs_html_text(o_href))));
18+                            xs_html_text(d_href))));
19 
20                 /* do not generate an Alt... */
21                 name = NULL;