diff options
| author | 2026-03-12 18:55:39 +0100 | |
|---|---|---|
| committer | 2026-03-12 18:55:39 +0100 | |
| commit | d48b7544a0a440bb1b7a01a6274def4c42c85e70 (patch) | |
| tree | 93374785394bb31da6385d91d6658d1ecd3a74ea | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-d48b7544a0a440bb1b7a01a6274def4c42c85e70.tar.gz snac2-d48b7544a0a440bb1b7a01a6274def4c42c85e70.tar.xz snac2-d48b7544a0a440bb1b7a01a6274def4c42c85e70.zip | |
Fixed an error in emptying hashtags from the web UI.
| -rw-r--r-- | html.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -5981,6 +5981,9 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 5981 | if (p_path && strcmp(p_path, "admin/followed-hashtags") == 0) { /** **/ | 5981 | if (p_path && strcmp(p_path, "admin/followed-hashtags") == 0) { /** **/ |
| 5982 | const char *followed_hashtags = xs_dict_get(p_vars, "followed_hashtags"); | 5982 | const char *followed_hashtags = xs_dict_get(p_vars, "followed_hashtags"); |
| 5983 | 5983 | ||
| 5984 | if (xs_is_null(followed_hashtags)) | ||
| 5985 | followed_hashtags = ""; | ||
| 5986 | |||
| 5984 | if (xs_is_string(followed_hashtags)) { | 5987 | if (xs_is_string(followed_hashtags)) { |
| 5985 | xs *new_hashtags = xs_list_new(); | 5988 | xs *new_hashtags = xs_list_new(); |
| 5986 | xs *l = xs_split(followed_hashtags, "\n"); | 5989 | xs *l = xs_split(followed_hashtags, "\n"); |
| @@ -6017,6 +6020,9 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 6017 | if (p_path && strcmp(p_path, "admin/blocked-hashtags") == 0) { /** **/ | 6020 | if (p_path && strcmp(p_path, "admin/blocked-hashtags") == 0) { /** **/ |
| 6018 | const char *hashtags = xs_dict_get(p_vars, "blocked_hashtags"); | 6021 | const char *hashtags = xs_dict_get(p_vars, "blocked_hashtags"); |
| 6019 | 6022 | ||
| 6023 | if (xs_is_null(hashtags)) | ||
| 6024 | hashtags = ""; | ||
| 6025 | |||
| 6020 | if (xs_is_string(hashtags)) { | 6026 | if (xs_is_string(hashtags)) { |
| 6021 | xs *new_hashtags = xs_list_new(); | 6027 | xs *new_hashtags = xs_list_new(); |
| 6022 | xs *l = xs_split(hashtags, "\n"); | 6028 | xs *l = xs_split(hashtags, "\n"); |