diff options
| author | 2025-05-23 21:26:35 +0000 | |
|---|---|---|
| committer | 2025-11-02 06:24:02 +0000 | |
| commit | 849294b24854b807e57026fcde9c26f4543267dd (patch) | |
| tree | ab8bbd2c14e4cd7084bbb4a43333ad8801799700 | |
| parent | Do not replace :shortnames: with nothing in case of failure (diff) | |
| download | penes-snac2-849294b24854b807e57026fcde9c26f4543267dd.tar.gz penes-snac2-849294b24854b807e57026fcde9c26f4543267dd.tar.xz penes-snac2-849294b24854b807e57026fcde9c26f4543267dd.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
| @@ -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; |