From b9dee83f27437941df6d7c7df3ca6bf2a89a56cc Mon Sep 17 00:00:00 2001 From: default Date: Mon, 12 Jun 2023 19:01:17 +0200 Subject: [PATCH] Fix links with # in it. --- format.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/format.c b/format.c index aad27d9..82af20b 100644 --- a/format.c +++ b/format.c @@ -73,7 +73,8 @@ static xs_str *format_line(const char *line, xs_list **attach) } else if (xs_startswith(v, "http")) { - xs *v2 = xs_strip_chars_i(xs_dup(v), "."); + xs *u = xs_replace(v, "#", "#"); + xs *v2 = xs_strip_chars_i(xs_dup(u), "."); const char *mime = xs_mime_by_ext(v2); @@ -89,7 +90,7 @@ static xs_str *format_line(const char *line, xs_list **attach) *attach = xs_list_append(*attach, d); } else { - xs *s1 = xs_fmt("%s", v2, v); + xs *s1 = xs_fmt("%s", v2, u); s = xs_str_cat(s, s1); } }