commit d48b754
grunfink
·
2026-03-12 17:55:39 +0000 UTC
parent 207cffd
Fixed an error in emptying hashtags from the web UI.
1 files changed,
+6,
-0
M
html.c
M
html.c
+6,
-0
1@@ -5981,6 +5981,9 @@ int html_post_handler(const xs_dict *req, const char *q_path,
2 if (p_path && strcmp(p_path, "admin/followed-hashtags") == 0) { /** **/
3 const char *followed_hashtags = xs_dict_get(p_vars, "followed_hashtags");
4
5+ if (xs_is_null(followed_hashtags))
6+ followed_hashtags = "";
7+
8 if (xs_is_string(followed_hashtags)) {
9 xs *new_hashtags = xs_list_new();
10 xs *l = xs_split(followed_hashtags, "\n");
11@@ -6017,6 +6020,9 @@ int html_post_handler(const xs_dict *req, const char *q_path,
12 if (p_path && strcmp(p_path, "admin/blocked-hashtags") == 0) { /** **/
13 const char *hashtags = xs_dict_get(p_vars, "blocked_hashtags");
14
15+ if (xs_is_null(hashtags))
16+ hashtags = "";
17+
18 if (xs_is_string(hashtags)) {
19 xs *new_hashtags = xs_list_new();
20 xs *l = xs_split(hashtags, "\n");