summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-05-23 21:26:35 +0000
committerGravatar Uko Kokņevičs2025-11-02 06:35:55 +0000
commite80ab0eb77e9aa42e1cb4d81e141aaa7dc7b4955 (patch)
tree3faa9011e2d34c04e7f1a5635924913297d11d92
parentDo not replace :shortnames: with nothing in case of failure (diff)
downloadpenes-snac2-e80ab0eb77e9aa42e1cb4d81e141aaa7dc7b4955.tar.gz
penes-snac2-e80ab0eb77e9aa42e1cb4d81e141aaa7dc7b4955.tar.xz
penes-snac2-e80ab0eb77e9aa42e1cb4d81e141aaa7dc7b4955.zip
Don't remove image attachments from posts that have MRFs adding links to images
-rw-r--r--html.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/html.c b/html.c
index 0c65fc2..f070099 100644
--- a/html.c
+++ b/html.c
@@ -2577,8 +2577,11 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2577 continue; 2577 continue;
2578 2578
2579 /* if this URL is already in the post content, skip */ 2579 /* if this URL is already in the post content, skip */
2580 if (content && xs_str_in(content, o_href) != -1) 2580 /* TODO: This should check more specifically that content has <img src="\{o_href}"> or some such! Some
2581 continue; 2581 instances also add a link to the image in post content which causes this to remove the image from
2582 attachments. */
2583 /* if (content && xs_str_in(content, o_href) != -1) */
2584 /* continue; */
2582 2585
2583 if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg"))) 2586 if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg")))
2584 continue; 2587 continue;