mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
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:
parent
f5438ed7a9
commit
ad4cdfc66d
1 changed files with 2 additions and 2 deletions
|
@ -65,9 +65,9 @@ QString MessageBuilder::matchLink(const QString &string)
|
||||||
"(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))"
|
"(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))"
|
||||||
"|"
|
"|"
|
||||||
// host name
|
// 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
|
// 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
|
// TLD identifier
|
||||||
"(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}]{2,}))"
|
"(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}]{2,}))"
|
||||||
"\\.?"
|
"\\.?"
|
||||||
|
|
Loading…
Reference in a new issue