diff options
| author | 2025-04-10 08:25:35 +0200 | |
|---|---|---|
| committer | 2025-04-10 08:25:35 +0200 | |
| commit | 32b7fa2fcb8d77cab49f0b17af75669139901859 (patch) | |
| tree | ae3f99263fc91128713c918d8c8550b37a727b79 /html.c | |
| parent | The avatar and header images have a prefix in their names. (diff) | |
| download | penes-snac2-32b7fa2fcb8d77cab49f0b17af75669139901859.tar.gz penes-snac2-32b7fa2fcb8d77cab49f0b17af75669139901859.tar.xz penes-snac2-32b7fa2fcb8d77cab49f0b17af75669139901859.zip | |
Shorten link label in Attachments.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -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; |