From kde-commits Wed Jul 23 17:28:52 2003 From: Ladislav Strojil Date: Wed, 23 Jul 2003 17:28:52 +0000 To: kde-commits Subject: kdenonbeta/kopete/libkopete X-MARC-Message: https://marc.info/?l=kde-commits&m=105898133704397 CVS commit by strojil: Handle the case without protocol specification separately to be able to add "http://" otherwise we get a link that is clickable but does not do anything M +2 -1 kopetemessage.cpp 1.117 --- kdenonbeta/kopete/libkopete/kopetemessage.cpp #1.116:1.117 @@ -480,5 +480,6 @@ QString KopeteMessage::parseLinks( const //Replace http/https/ftp links - result.replace( QRegExp( QString::fromLatin1("\\b((http://\\w|ftp://\\w|https://\\w|www\\.)[-\\w\\._]+[-\\w\\./#&;:=\\?~%_,]*)\\b") ), QString::fromLatin1("\\1" ) ); + result.replace( QRegExp( QString::fromLatin1("\\b((http://\\w|ftp://\\w|https://\\w)[-\\w\\._]+[-\\w\\./#&;:=\\?~%_,]*)\\b") ), QString::fromLatin1("\\1" ) ); + result.replace( QRegExp( QString::fromLatin1("\\b((www\\.)[-\\w\\._]+[-\\w\\./#&;:=\\?~%_,]*)\\b") ), QString::fromLatin1("\\1" ) );