summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2025-04-10 08:25:35 +0200
committerGravatar default2025-04-10 08:25:35 +0200
commit32b7fa2fcb8d77cab49f0b17af75669139901859 (patch)
treeae3f99263fc91128713c918d8c8550b37a727b79 /html.c
parentThe avatar and header images have a prefix in their names. (diff)
downloadsnac2-32b7fa2fcb8d77cab49f0b17af75669139901859.tar.gz
snac2-32b7fa2fcb8d77cab49f0b17af75669139901859.tar.xz
snac2-32b7fa2fcb8d77cab49f0b17af75669139901859.zip
Shorten link label in Attachments.
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index a598038..e303d72 100644
--- a/html.c
+++ b/html.c
@@ -2439,13 +2439,19 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2439 name = NULL; 2439 name = NULL;
2440 } 2440 }
2441 else { 2441 else {
2442 xs *d_href = xs_dup(o_href);
2443 if (strlen(d_href) > 64) {
2444 d_href[64] = '\0';
2445 d_href = xs_str_cat(d_href, "...");
2446 }
2447
2442 xs_html_add(content_attachments, 2448 xs_html_add(content_attachments,
2443 xs_html_tag("p", 2449 xs_html_tag("p",
2444 xs_html_tag("a", 2450 xs_html_tag("a",
2445 xs_html_attr("href", o_href), 2451 xs_html_attr("href", o_href),
2446 xs_html_text(L("Attachment")), 2452 xs_html_text(L("Attachment")),
2447 xs_html_text(": "), 2453 xs_html_text(": "),
2448 xs_html_text(o_href)))); 2454 xs_html_text(d_href))));
2449 2455
2450 /* do not generate an Alt... */ 2456 /* do not generate an Alt... */
2451 name = NULL; 2457 name = NULL;