summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar grunfink2025-06-06 21:02:28 +0200
committerGravatar grunfink2025-06-06 21:02:28 +0200
commitcbf71ca0cabdf46a1eb595db01601858c8823acc (patch)
tree2fa7065b5331a693847913dedaef046593fefe6f
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-cbf71ca0cabdf46a1eb595db01601858c8823acc.tar.gz
snac2-cbf71ca0cabdf46a1eb595db01601858c8823acc.tar.xz
snac2-cbf71ca0cabdf46a1eb595db01601858c8823acc.zip
Skip incomplete attachments.
-rw-r--r--html.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/html.c b/html.c
index a6e5f98..d513d10 100644
--- a/html.c
+++ b/html.c
@@ -2427,6 +2427,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2427 const char *o_href = xs_dict_get(a, "href"); 2427 const char *o_href = xs_dict_get(a, "href");
2428 const char *name = xs_dict_get(a, "name"); 2428 const char *name = xs_dict_get(a, "name");
2429 2429
2430 if (!xs_is_string(type) || !xs_is_string(o_href))
2431 continue;
2432
2430 /* if this URL is already in the post content, skip */ 2433 /* if this URL is already in the post content, skip */
2431 if (content && xs_str_in(content, o_href) != -1) 2434 if (content && xs_str_in(content, o_href) != -1)
2432 continue; 2435 continue;