commit 76e1608
default
·
2023-07-13 08:49:49 +0000 UTC
parent ff8e400
Fixed memory leaks.
1 files changed,
+13,
-6
M
html.c
M
html.c
+13,
-6
1@@ -519,6 +519,13 @@ d_char *html_top_controls(snac *snac, d_char *s)
2
3 const char *bot = xs_dict_get(snac->config, "bot");
4
5+ xs *es1 = encode_html(xs_dict_get(snac->config, "name"));
6+ xs *es2 = encode_html(xs_dict_get(snac->config, "bio"));
7+ xs *es3 = encode_html(email);
8+ xs *es4 = encode_html(telegram_bot);
9+ xs *es5 = encode_html(telegram_chat_id);
10+ xs *es6 = encode_html(purge_days);
11+
12 xs *s1 = xs_fmt(_tmpl,
13 snac->actor,
14 L("Sensitive content"),
15@@ -550,19 +557,19 @@ d_char *html_top_controls(snac *snac, d_char *s)
16 L("User setup..."),
17 snac->actor,
18 L("Display name"),
19- encode_html(xs_dict_get(snac->config, "name")),
20+ es1,
21 L("Avatar"),
22 L("Bio"),
23- encode_html(xs_dict_get(snac->config, "bio")),
24+ es2,
25 strcmp(cw, "open") == 0 ? "checked" : "",
26 L("Always show sensitive content"),
27 L("Email address for notifications"),
28- encode_html(email),
29+ es3,
30 L("Telegram notifications (bot key and chat id)"),
31- encode_html(telegram_bot),
32- encode_html(telegram_chat_id),
33+ es4,
34+ es5,
35 L("Maximum days to keep posts (0: server settings)"),
36- encode_html(purge_days),
37+ es6,
38 xs_type(d_dm_f_u) == XSTYPE_TRUE ? "checked" : "",
39 L("Drop direct messages from people you don't follow"),
40 xs_type(bot) == XSTYPE_TRUE ? "checked" : "",