commit 79c3248
grunfink
·
2025-12-20 12:15:34 +0000 UTC
parent f78b71d
Fixed failed search when blank surround the query string.
1 files changed,
+5,
-1
M
html.c
M
html.c
+5,
-1
1@@ -4343,9 +4343,13 @@ int html_get_handler(const xs_dict *req, const char *q_path,
2 status = HTTP_STATUS_UNAUTHORIZED;
3 }
4 else {
5- const char *q = xs_dict_get(q_vars, "q");
6+ xs *q = NULL;
7+ const char *q1 = xs_dict_get(q_vars, "q");
8 xs *url_acct = NULL;
9
10+ if (xs_is_string(q1))
11+ q = xs_strip_i(xs_dup(q1));
12+
13 /* searching for an URL? */
14 if (q && xs_match(q, "https://*|http://*")) {
15 /* may by an actor; try a webfinger */