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:26:42 +0000
commit6a1287ecfb1dfe12a25bed63ad32a8a0bac01fa9 (patch)
tree8c9bce39e4790e783d7dee7e99a558cdc1219196
parentDo not replace :shortnames: with nothing in case of failure (diff)
downloadpenes-snac2-6a1287ecfb1dfe12a25bed63ad32a8a0bac01fa9.tar.gz
penes-snac2-6a1287ecfb1dfe12a25bed63ad32a8a0bac01fa9.tar.xz
penes-snac2-6a1287ecfb1dfe12a25bed63ad32a8a0bac01fa9.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 951eb7a..2b11436 100644
--- a/html.c
+++ b/html.c
@@ -2507,8 +2507,11 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2507 continue; 2507 continue;
2508 2508
2509 /* if this URL is already in the post content, skip */ 2509 /* if this URL is already in the post content, skip */
2510 if (content && xs_str_in(content, o_href) != -1) 2510 /* TODO: This should check more specifically that content has <img src="\{o_href}"> or some such! Some
2511 continue; 2511 instances also add a link to the image in post content which causes this to remove the image from
2512 attachments. */
2513 /* if (content && xs_str_in(content, o_href) != -1) */
2514 /* continue; */
2512 2515
2513 if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg"))) 2516 if (strcmp(type, "image/svg+xml") == 0 && !xs_is_true(xs_dict_get(srv_config, "enable_svg")))
2514 continue; 2517 continue;