mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed case sensitivity in link matching
This commit is contained in:
parent
e12f76387a
commit
17ff0b9d83
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ namespace {
|
|||
#ifdef C_MATCH_IPV6_LINK
|
||||
bool isValidIpv6(QStringRef &host)
|
||||
{
|
||||
static auto exp = QRegularExpression("^\\[[a-f0-9:%]+\\]$");
|
||||
static auto exp = QRegularExpression("^\\[[a-fA-F0-9:%]+\\]$");
|
||||
|
||||
return exp.match(host).hasMatch();
|
||||
}
|
||||
|
@ -70,12 +70,12 @@ LinkParser::LinkParser(const QString &unparsedString)
|
|||
bool hasHttp = false;
|
||||
|
||||
// Protocol `https?://`
|
||||
if (l.startsWith("https://"))
|
||||
if (l.startsWith("https://", Qt::CaseInsensitive))
|
||||
{
|
||||
hasHttp = true;
|
||||
l = l.mid(8);
|
||||
}
|
||||
else if (l.startsWith("http://"))
|
||||
else if (l.startsWith("http://", Qt::CaseInsensitive))
|
||||
{
|
||||
hasHttp = true;
|
||||
l = l.mid(7);
|
||||
|
|
Loading…
Reference in a new issue