From 8d3750f608caf9bd6cc390da494381ff5f36e57e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 Oct 2012 21:49:44 +0400 Subject: [PATCH] Get rid of some false-positive urls detections. --- src/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/url.c b/src/url.c index 6245fc959..f2e4954e2 100644 --- a/src/url.c +++ b/src/url.c @@ -1277,7 +1277,7 @@ static gboolean url_web_start (const gchar *begin, const gchar *end, const gchar *pos, url_match_t *match) { /* Check what we have found */ - if (pos > begin && *pos == 'w' && *(pos + 1) == 'w' && *(pos + 2) == 'w') { + if (pos > begin && (g_ascii_strncasecmp (pos, "www", 3) == 0 || g_ascii_strncasecmp (pos, "ftp", 3) == 0)) { if (!is_open_brace (*(pos - 1)) && !g_ascii_isspace (*(pos - 1))) { return FALSE; } -- 2.39.5