summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/html.c b/html.c
index 7c46c76..294faa3 100644
--- a/html.c
+++ b/html.c
@@ -2205,18 +2205,21 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2205 2205
2206 if (xs_type(type) == XSTYPE_STRING && strcmp(type, "Hashtag") == 0) { 2206 if (xs_type(type) == XSTYPE_STRING && strcmp(type, "Hashtag") == 0) {
2207 const char *o_href = xs_dict_get(tag, "href"); 2207 const char *o_href = xs_dict_get(tag, "href");
2208 xs *href = xs_utf8_to_lower(o_href);
2209 2208
2210 if (xs_type(href) == XSTYPE_STRING && xs_str_in(content, href) == -1) { 2209 if (xs_type(o_href) == XSTYPE_STRING) {
2211 /* not in the content: add here */ 2210 xs *href = xs_utf8_to_lower(o_href);
2212 const char *name = xs_dict_get(tag, "name");
2213 2211
2214 xs_html_add(add_hashtags, 2212 if (xs_type(href) == XSTYPE_STRING && xs_str_in(content, href) == -1) {
2215 xs_html_tag("li", 2213 /* not in the content: add here */
2216 xs_html_tag("a", 2214 const char *name = xs_dict_get(tag, "name");
2217 xs_html_attr("href", href), 2215
2218 xs_html_text(name), 2216 xs_html_add(add_hashtags,
2219 xs_html_text(" ")))); 2217 xs_html_tag("li",
2218 xs_html_tag("a",
2219 xs_html_attr("href", href),
2220 xs_html_text(name),
2221 xs_html_text(" "))));
2222 }
2220 } 2223 }
2221 } 2224 }
2222 } 2225 }