summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-05-23 21:26:35 +0000
committerGravatar Uko Kokņevičs2025-06-08 02:55:27 +0000
commit4df252b0f2e054cbfffdc5fc0276a90933f4b78e (patch)
treebf1059969d36ada1eb933599ed0f89a7b3e3f0ce /html.c
parentDo not replace :shortnames: with nothing in case of failure (diff)
downloadpenes-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
Diffstat (limited to 'html.c')
-rw-r--r--html.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/html.c b/html.c
index 5b95353..5d8b0ed 100644
--- a/html.c
+++ b/html.c
@@ -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;