Revision of RFC compliant URL matching

This is a fix to allow matching of websites such as http://1337.net
This commit is contained in:
Lajamerr Mittesdine 2018-06-04 22:14:44 -04:00 committed by GitHub
parent f5438ed7a9
commit ad4cdfc66d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,}))"
"\\.?"