diff options
| author | 2025-04-21 11:02:05 +0000 | |
|---|---|---|
| committer | 2025-05-23 21:13:22 +0000 | |
| commit | 3f166e55d6975a1f787d2810801f3ea34eed05e4 (patch) | |
| tree | ce536785687a03c15edf7dad6a00096c5b879add | |
| parent | Fix custom emojis not appearing (diff) | |
| download | penes-snac2-3f166e55d6975a1f787d2810801f3ea34eed05e4.tar.gz penes-snac2-3f166e55d6975a1f787d2810801f3ea34eed05e4.tar.xz penes-snac2-3f166e55d6975a1f787d2810801f3ea34eed05e4.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
| @@ -2392,8 +2392,11 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2392 | const char *name = xs_dict_get(a, "name"); | 2392 | const char *name = xs_dict_get(a, "name"); |
| 2393 | 2393 | ||
| 2394 | /* if this image is already in the post content, skip */ | 2394 | /* if this image is already in the post content, skip */ |
| 2395 | if (content && xs_str_in(content, o_href) != -1) | 2395 | /* TODO: This should check more specifically that content has <img src="\{o_href}"> or some such! Some |
| 2396 | continue; | 2396 | instances also add a link to the image in post content which causes this to remove the image from |
| 2397 | attachments. */ | ||
| 2398 | /* if (content && xs_str_in(content, o_href) != -1) */ | ||
| 2399 | /* continue; */ | ||
| 2397 | 2400 | ||
| 2398 | /* drop silently any attachment that may include JavaScript */ | 2401 | /* drop silently any attachment that may include JavaScript */ |
| 2399 | if (strcmp(type, "text/html") == 0) | 2402 | if (strcmp(type, "text/html") == 0) |