diff options
| author | 2025-05-23 21:26:35 +0000 | |
|---|---|---|
| committer | 2025-06-08 02:55:27 +0000 | |
| commit | 4df252b0f2e054cbfffdc5fc0276a90933f4b78e (patch) | |
| tree | bf1059969d36ada1eb933599ed0f89a7b3e3f0ce | |
| parent | Do not replace :shortnames: with nothing in case of failure (diff) | |
| download | penes-snac2-4df252b0f2e054cbfffdc5fc0276a90933f4b78e.tar.gz penes-snac2-4df252b0f2e054cbfffdc5fc0276a90933f4b78e.tar.xz penes-snac2-4df252b0f2e054cbfffdc5fc0276a90933f4b78e.zip | |
Don't remove image attachments from posts that have MRFs adding links to images
| -rw-r--r-- | html.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -2425,8 +2425,11 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2425 | const char *name = xs_dict_get(a, "name"); | 2425 | const char *name = xs_dict_get(a, "name"); |
| 2426 | 2426 | ||
| 2427 | /* if this URL is already in the post content, skip */ | 2427 | /* if this URL is already in the post content, skip */ |
| 2428 | if (content && xs_str_in(content, o_href) != -1) | 2428 | /* TODO: This should check more specifically that content has <img src="\{o_href}"> or some such! Some |
| 2429 | continue; | 2429 | instances also add a link to the image in post content which causes this to remove the image from |
| 2430 | attachments. */ | ||
| 2431 | /* if (content && xs_str_in(content, o_href) != -1) */ | ||
| 2432 | /* continue; */ | ||
| 2430 | 2433 | ||
| 2431 | if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg"))) | 2434 | if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg"))) |
| 2432 | continue; | 2435 | continue; |