static QRegExp regExp[] = {
// URL
// QRegExp(QString("((?:https?://|s?ftp://|irc://|mailto:|www\\.)%1+|%1+\\.[a-z]{2,4}(?:?=/%1+|\\b))%2").arg(urlChars, urlEnd)),
- QRegExp(QString("((?:(?:https?://|s?ftp://|irc://|mailto:)|www)%1+)%2").arg(urlChars, urlEnd), Qt::CaseInsensitive),
+ QRegExp(QString("((?:(?:https?://|s?ftp://|irc://|gopher://|mailto:)|www)%1+)%2").arg(urlChars, urlEnd), Qt::CaseInsensitive),
// Channel name
// We don't match for channel names starting with + or &, because that gives us a lot of false positives.
case Clickable::Url:
if(!str.contains("://"))
str = "http://" + str;
- QDesktopServices::openUrl(QUrl::fromEncoded(str.toAscii()));
+ QDesktopServices::openUrl(QUrl::fromEncoded(str.toUtf8(), QUrl::TolerantMode));
break;
case Clickable::Channel:
// TODO join or whatever...