commit e251c61

green  ·  2025-04-01 21:08:48 +0000 UTC
parent 8c2abef
allow emoji urls with no extension
1 files changed,  +2, -1
+2, -1
 1@@ -385,7 +385,8 @@ xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag
 2             const char *t = NULL;
 3 
 4             /* is it an URL to an image? */
 5-            if (xs_startswith(v, "https:/" "/") && xs_startswith((t = xs_mime_by_ext(v)), "image/")) {
 6+            if (xs_startswith(v, "https:/" "/") &&
 7+                (xs_startswith((t = xs_mime_by_ext(v)), "image/") || strrchr(v, '.') == NULL)) {
 8                 if (tag && xs_str_in(s, k) != -1) {
 9                     /* add the emoji to the tag list */
10                     xs *e = xs_dict_new();