Просмотр исходного кода

Don't use a NULL md5 in quoted post anchors.

grunfink 4 месяцев назад
Родитель
Сommit
ef27a364a6
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      html.c

+ 3 - 1
html.c

@@ -2802,10 +2802,12 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
             xs *quoted_post = NULL;
 
             if (valid_status(object_get(quoted_id, &quoted_post))) {
+                xs *md5 = xs_md5_hex(quoted_id, strlen(quoted_id));
+
                 xs_html_add(snac_content,
                     xs_html_tag("blockquote",
                         xs_html_attr("class", "snac-quoted-post"),
-                        html_entry(user, quoted_post, 1, level + 1, NULL, 1)));
+                        html_entry(user, quoted_post, 1, level + 1, md5, 1)));
             }
             else
             if (user)