Fix for ticket #68

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1852 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
dondiimperial 2009-11-28 17:52:17 +00:00
parent 83778b39ad
commit d2665f9dd6

View File

@ -246,8 +246,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
QString name = QString::fromStdString(ci ->name); QString name = QString::fromStdString(ci ->name);
QString message = QString::fromStdWString(ci -> msg); QString message = QString::fromStdWString(ci -> msg);
//replace http:// and www. with <a href> links //replace http://, https:// and www. with <a href> links
QRegExp rx("(http://[^ <>]*)|(www\\.[^ <>]*)"); QRegExp rx("(https?://[^ <>]*)|(www\\.[^ <>]*)");
int count = 0; int count = 0;
int pos = 100; //ignor the first 100 charater because of the standard DTD ref int pos = 100; //ignor the first 100 charater because of the standard DTD ref
while ( (pos = rx.indexIn(message, pos)) != -1 ) { while ( (pos = rx.indexIn(message, pos)) != -1 ) {