diff options
| author | 2025-03-24 02:44:58 +0100 | |
|---|---|---|
| committer | 2025-04-13 14:40:00 +0200 | |
| commit | 5fd3823e14639931177656a51e71b74d886d4f9a (patch) | |
| tree | e916514438b069db32ac5ee55323a0c898207ca1 /html.c | |
| parent | maybe a fix for username emojis (diff) | |
| download | snac2-5fd3823e14639931177656a51e71b74d886d4f9a.tar.gz snac2-5fd3823e14639931177656a51e71b74d886d4f9a.tar.xz snac2-5fd3823e14639931177656a51e71b74d886d4f9a.zip | |
emojis in usernames in web ui
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -980,10 +980,16 @@ static xs_html *html_user_body(snac *user, int read_only) | |||
| 980 | xs_dict_get(user->config, "uid"), | 980 | xs_dict_get(user->config, "uid"), |
| 981 | xs_dict_get(srv_config, "host")); | 981 | xs_dict_get(srv_config, "host")); |
| 982 | 982 | ||
| 983 | // also try to make emojis render in local usernames, specifically in the user info thing in the web ui | ||
| 984 | xs *name_tags = xs_list_new(); | ||
| 985 | xs *name1 = not_really_markdown(xs_dict_get(user->config, "name"), NULL, &name_tags); | ||
| 986 | xs *name2 = sanitize(name1); | ||
| 987 | name2 = replace_shortnames(name2, name_tags, 1, proxy); | ||
| 988 | |||
| 983 | xs_html_add(top_user, | 989 | xs_html_add(top_user, |
| 984 | xs_html_tag("p", | 990 | xs_html_tag("p", |
| 985 | xs_html_attr("class", "p-name snac-top-user-name"), | 991 | xs_html_attr("class", "p-name snac-top-user-name"), |
| 986 | xs_html_text(xs_dict_get(user->config, "name"))), | 992 | xs_html_raw(name2)), |
| 987 | xs_html_tag("p", | 993 | xs_html_tag("p", |
| 988 | xs_html_attr("class", "snac-top-user-id"), | 994 | xs_html_attr("class", "snac-top-user-id"), |
| 989 | xs_html_text(handle))); | 995 | xs_html_text(handle))); |