aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-12-20 13:15:34 +0100
committergrunfink <grunfink@comam.es>2025-12-20 13:15:34 +0100
commit79c32485dffa95107216c2251ffa111d7cdef432 (patch)
tree119e1293e59505285008c253377b30242f22e62b /html.c
parentf78b71d79ffc7c2289d43b510922315f64c7fb51 (diff)
Fixed failed search when blank surround the query string.
Diffstat (limited to 'html.c')
-rw-r--r--html.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/html.c b/html.c
index 0b84e56..20ad839 100644
--- a/html.c
+++ b/html.c
@@ -4343,9 +4343,13 @@ 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");
+ xs *q = NULL;
+ const char *q1 = xs_dict_get(q_vars, "q");
xs *url_acct = NULL;
+ if (xs_is_string(q1))
+ q = xs_strip_i(xs_dup(q1));
+
/* searching for an URL? */
if (q && xs_match(q, "https://*|http://*")) {
/* may by an actor; try a webfinger */