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-08-01 22:19:11 +0000
commit29ce843b35b3bc0414294751a244728835a31f93 (patch)
treedcd6f96c1a8bb0c8f9bd4bce30449828baeea43c /html.c
parentDo not replace :shortnames: with nothing in case of failure (diff)
downloadpenes-snac2-29ce843b35b3bc0414294751a244728835a31f93.tar.gz
penes-snac2-29ce843b35b3bc0414294751a244728835a31f93.tar.xz
penes-snac2-29ce843b35b3bc0414294751a244728835a31f93.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 fcf9a95..92921e4 100644
--- a/html.c
+++ b/html.c
@@ -2453,8 +2453,11 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2453 continue; 2453 continue;
2454 2454
2455 /* if this URL is already in the post content, skip */ 2455 /* if this URL is already in the post content, skip */
2456 if (content && xs_str_in(content, o_href) != -1) 2456 /* TODO: This should check more specifically that content has <img src="\{o_href}"> or some such! Some
2457 continue; 2457 instances also add a link to the image in post content which causes this to remove the image from
2458 attachments. */
2459 /* if (content && xs_str_in(content, o_href) != -1) */
2460 /* continue; */
2458 2461
2459 if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg"))) 2462 if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg")))
2460 continue; 2463 continue;