commit be4dd4e
grunfink
·
2025-12-26 20:24:08 +0000 UTC
parent a1f0a89
Fixed failed search when blank surround the query string. This time, without fucking up everything.
1 files changed,
+7,
-1
M
html.c
M
html.c
+7,
-1
1@@ -4343,9 +4343,15 @@ 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+ const char *q = NULL;
7+ xs *cq = xs_dup(xs_dict_get(q_vars, "q"));
8 xs *url_acct = NULL;
9
10+ if (xs_is_string(cq)) {
11+ cq = xs_strip_i(cq);
12+ q = cq;
13+ }
14+
15 /* searching for an URL? */
16 if (q && xs_match(q, "https://*|http://*")) {
17 /* may by an actor; try a webfinger */