diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 22 |
1 files changed, 11 insertions, 11 deletions
| @@ -151,6 +151,17 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, | |||
| 151 | xs_html_attr("class", "p-author h-card snac-author"), | 151 | xs_html_attr("class", "p-author h-card snac-author"), |
| 152 | xs_html_raw(name))); /* name is already html-escaped */ | 152 | xs_html_raw(name))); /* name is already html-escaped */ |
| 153 | 153 | ||
| 154 | if (!xs_is_null(url)) { | ||
| 155 | xs *md5 = xs_md5_hex(url, strlen(url)); | ||
| 156 | |||
| 157 | xs_html_add(actor_icon, | ||
| 158 | xs_html_text(" "), | ||
| 159 | xs_html_tag("a", | ||
| 160 | xs_html_attr("href", (char *)url), | ||
| 161 | xs_html_attr("title", md5), | ||
| 162 | xs_html_text("»"))); | ||
| 163 | } | ||
| 164 | |||
| 154 | if (strcmp(xs_dict_get(actor, "type"), "Service") == 0) { | 165 | if (strcmp(xs_dict_get(actor, "type"), "Service") == 0) { |
| 155 | xs_html_add(actor_icon, | 166 | xs_html_add(actor_icon, |
| 156 | xs_html_text(" "), | 167 | xs_html_text(" "), |
| @@ -167,17 +178,6 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, | |||
| 167 | xs_html_raw("🤝"))); | 178 | xs_html_raw("🤝"))); |
| 168 | } | 179 | } |
| 169 | 180 | ||
| 170 | if (!xs_is_null(url)) { | ||
| 171 | xs *md5 = xs_md5_hex(url, strlen(url)); | ||
| 172 | |||
| 173 | xs_html_add(actor_icon, | ||
| 174 | xs_html_text(" "), | ||
| 175 | xs_html_tag("a", | ||
| 176 | xs_html_attr("href", (char *)url), | ||
| 177 | xs_html_attr("title", md5), | ||
| 178 | xs_html_text("»"))); | ||
| 179 | } | ||
| 180 | |||
| 181 | if (priv) { | 181 | if (priv) { |
| 182 | xs_html_add(actor_icon, | 182 | xs_html_add(actor_icon, |
| 183 | xs_html_text(" "), | 183 | xs_html_text(" "), |