From d48b7544a0a440bb1b7a01a6274def4c42c85e70 Mon Sep 17 00:00:00 2001 From: grunfink Date: Thu, 12 Mar 2026 18:55:39 +0100 Subject: Fixed an error in emptying hashtags from the web UI. --- html.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'html.c') 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"); -- cgit v1.2.3