diff options
| -rw-r--r-- | html.c | 23 |
1 files changed, 13 insertions, 10 deletions
| @@ -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 | } |