From ad4cdfc66d8171b352b28d20577ecd3f280e56f1 Mon Sep 17 00:00:00 2001 From: Lajamerr Mittesdine Date: Mon, 4 Jun 2018 22:14:44 -0400 Subject: [PATCH] Revision of RFC compliant URL matching This is a fix to allow matching of websites such as http://1337.net --- src/messages/messagebuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messages/messagebuilder.cpp b/src/messages/messagebuilder.cpp index 79617c989..56dc86cf2 100644 --- a/src/messages/messagebuilder.cpp +++ b/src/messages/messagebuilder.cpp @@ -65,9 +65,9 @@ QString MessageBuilder::matchLink(const QString &string) "(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" "|" // host name - "(?:(?:[a-z\\x{00a1}-\\x{ffff}0-9]-*)*[a-z\\x{00a1}-\\x{ffff0}-9]+)" + "(?:(?:[a-z\\x{00a1}-\\x{ffff}0-9]-*)*[a-z\\x{00a1}-\\x{ffff}0-9]+)" // domain name - "(?:\\.(?:[a-z\\x{00a1}-\\x{ffff0}-9]-*)*[a-z\\x{00a1}-\\x{ffff0}-9]+)*" + "(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}0-9]-*)*[a-z\\x{00a1}-\\x{ffff}0-9]+)*" // TLD identifier "(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}]{2,}))" "\\.?"