aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-12-26 21:24:08 +0100
committergrunfink <grunfink@comam.es>2025-12-26 21:24:08 +0100
commitbe4dd4ea7f58a31546ad873d5b464fdb8b289ec8 (patch)
tree90f86d08111fcbf0704d183808b617d4baa119f8
parenta1f0a89931ad1ac51e28c318e29ef7f1cfc25255 (diff)
Fixed failed search when blank surround the query string.
This time, without fucking up everything.
-rw-r--r--html.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index 0b84e56..3e692bd 100644
--- a/html.c
+++ b/html.c
@@ -4343,9 +4343,15 @@ int html_get_handler(const xs_dict *req, const char *q_path,
status = HTTP_STATUS_UNAUTHORIZED;
}
else {
- const char *q = xs_dict_get(q_vars, "q");
+ const char *q = NULL;
+ xs *cq = xs_dup(xs_dict_get(q_vars, "q"));
xs *url_acct = NULL;
+ if (xs_is_string(cq)) {
+ cq = xs_strip_i(cq);
+ q = cq;
+ }
+
/* searching for an URL? */
if (q && xs_match(q, "https://*|http://*")) {
/* may by an actor; try a webfinger */