1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
dubslow 2014-11-04 14:32:38 -06:00
parent 94ba54bc7d
commit f8fa37e4a9

View File

@ -28,7 +28,7 @@ QString MessageAction::getMessage(QString div)
QString message_ = SmileyPack::getInstance().smileyfied(toHtmlChars(message)); QString message_ = SmileyPack::getInstance().smileyfied(toHtmlChars(message));
// detect urls // detect urls
QRegExp exp("(www\\.|http[s]?:\\/\\/|ftp:\\/\\/)\\S+"); QRegExp exp("(?:\\b)(www\\.|http[s]?:\\/\\/|ftp:\\/\\/)\\S+");
int offset = 0; int offset = 0;
while ((offset = exp.indexIn(message_, offset)) != -1) while ((offset = exp.indexIn(message_, offset)) != -1)
{ {