commit 107e7c0

default  ·  2024-10-08 18:30:20 +0000 UTC
parent 3879649
Fixed emojis in the public profile.
2 files changed,  +4, -2
M html.c
+1, -1
1@@ -1158,7 +1158,7 @@ xs_dict *msg_actor(snac *snac)
2     msg = xs_dict_set(msg, "preferredUsername", snac->uid);
3     msg = xs_dict_set(msg, "published",         xs_dict_get(snac->config, "published"));
4 
5-    xs *f_bio_2 = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL, NULL);
6+    xs *f_bio_2 = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL, &tags);
7     f_bio = process_tags(snac, f_bio_2, &tags);
8     msg = xs_dict_set(msg, "summary", f_bio);
9     msg = xs_dict_set(msg, "tag", tags);
M html.c
+3, -1
 1@@ -821,10 +821,12 @@ static xs_html *html_user_body(snac *user, int read_only)
 2 
 3     if (read_only) {
 4         xs *es1  = encode_html(xs_dict_get(user->config, "bio"));
 5-        xs *bio1 = not_really_markdown(es1, NULL, NULL);
 6         xs *tags = xs_list_new();
 7+        xs *bio1 = not_really_markdown(es1, NULL, &tags);
 8         xs *bio2 = process_tags(user, bio1, &tags);
 9 
10+        bio2 = replace_shortnames(bio2, tags, 2);
11+
12         xs_html *top_user_bio = xs_html_tag("div",
13             xs_html_attr("class", "p-note snac-top-user-bio"),
14             xs_html_raw(bio2)); /* already sanitized */