From ca59f459325fb93d69207a8f5991178b1b5727a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sun, 14 Mar 2021 14:54:59 +0200 Subject: [PATCH 1/1] Adjusted URL detection for search queries Dashes may appear in domain names. --- src/gmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmutil.c b/src/gmutil.c index 2b40367d..857cd990 100644 --- a/src/gmutil.c +++ b/src/gmutil.c @@ -312,7 +312,7 @@ iBool isLikelyUrl_String(const iString *d) { hostname */ iRegExp *pattern = new_RegExp("^([a-z]+:)?//.*|" "^(//)?([^/?#: ]+)([/?#:].*)$|" - "^(\\w+(\\.\\w+)+|localhost)$", + "^([-\\w]+(\\.[-\\w]+)+|localhost)$", caseInsensitive_RegExpOption); iRegExpMatch m; init_RegExpMatch(&m); -- 2.34.1