Explorar el Código

Fixed failed search when blank surround the query string.

grunfink hace 7 meses
padre
commit
79c32485df
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      html.c

+ 5 - 1
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 */