Explorar o código

allow emoji urls with no extension

green hai 1 ano
pai
achega
e251c61382
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      format.c

+ 2 - 1
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();