aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-03-12 18:55:39 +0100
committergrunfink <grunfink@comam.es>2026-03-12 18:55:39 +0100
commitd48b7544a0a440bb1b7a01a6274def4c42c85e70 (patch)
tree93374785394bb31da6385d91d6658d1ecd3a74ea /html.c
parent207cffdc0e879ea162a6a0a9bc046d9d100654cb (diff)
Fixed an error in emptying hashtags from the web UI.
Diffstat (limited to 'html.c')
-rw-r--r--html.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/html.c b/html.c
index 3dce6a4..dda387a 100644
--- a/html.c
+++ b/html.c
@@ -5981,6 +5981,9 @@ int html_post_handler(const xs_dict *req, const char *q_path,
if (p_path && strcmp(p_path, "admin/followed-hashtags") == 0) { /** **/
const char *followed_hashtags = xs_dict_get(p_vars, "followed_hashtags");
+ if (xs_is_null(followed_hashtags))
+ followed_hashtags = "";
+
if (xs_is_string(followed_hashtags)) {
xs *new_hashtags = xs_list_new();
xs *l = xs_split(followed_hashtags, "\n");
@@ -6017,6 +6020,9 @@ int html_post_handler(const xs_dict *req, const char *q_path,
if (p_path && strcmp(p_path, "admin/blocked-hashtags") == 0) { /** **/
const char *hashtags = xs_dict_get(p_vars, "blocked_hashtags");
+ if (xs_is_null(hashtags))
+ hashtags = "";
+
if (xs_is_string(hashtags)) {
xs *new_hashtags = xs_list_new();
xs *l = xs_split(hashtags, "\n");