aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreen <dandelions@disroot.org>2025-04-01 23:08:48 +0200
committergreen <dandelions@disroot.org>2025-04-13 14:42:02 +0200
commite251c61382d4cd39ed89876a37962acab1122f84 (patch)
treeeab41e2c808089dce0bdbeea626b21871b7a3cea
parent8c2abef699a98652c290bafd844f8ae2c25eef7f (diff)
allow emoji urls with no extension
-rw-r--r--format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/format.c b/format.c
index b2b585d..43dd638 100644
--- a/format.c
+++ b/format.c
@@ -385,7 +385,8 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag
const char *t = NULL;
/* is it an URL to an image? */
- if (xs_startswith(v, "https:/" "/") && xs_startswith((t = xs_mime_by_ext(v)), "image/")) {
+ if (xs_startswith(v, "https:/" "/") &&
+ (xs_startswith((t = xs_mime_by_ext(v)), "image/") || strrchr(v, '.') == NULL)) {
if (tag && xs_str_in(s, k) != -1) {
/* add the emoji to the tag list */
xs *e = xs_dict_new();