recognize subdomains of hedgewars.org
authorsheepluva
Sat, 16 Jan 2016 19:29:28 +0100 (2016-01-16)
changeset 11516 6873bd4d120c
parent 11515 4dd77731453b
child 11517 b3ee79e8e3b9
recognize subdomains of hedgewars.org
QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Sat Jan 16 19:20:06 2016 +0100
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Sat Jan 16 19:29:28 2016 +0100
@@ -373,7 +373,7 @@
     return QString("<span class=\"nick\">%1</span>").arg(Qt::escape(nickname));
 }
 
-const QRegExp HWChatWidget::URLREGEXP = QRegExp("(http(s)?://)?(www\\.)?((hedgewars\\.org|code\\.google\\.com|googlecode\\.com|hh\\.unit22\\.org)(/[^ ]*)?)");
+const QRegExp HWChatWidget::URLREGEXP = QRegExp("(http(s)?://)?(www\\.)?((([^/:?&#]+\\.)?hedgewars\\.org|code\\.google\\.com|googlecode\\.com|hh\\.unit22\\.org)(/[^ ]*)?)");
 
 bool HWChatWidget::containsHighlight(const QString & sender, const QString & message)
 {