Version: 0.7.1 (using KDE KDE 3.1.3) Installed from: SuSE RPMs Compiler: Gcc 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux When I send an URL like fish://user@host/path only user@host will be a clickable link. It looks like kopete creates something like this of it: fish://<a href="mailto:user@host">user@host</a>/path although it should generate <a href="fish://user@host/path">fish://user@host/path</a> (Hope the tags won't be cut off by Bugzilla)
this seems more like a wishlist bug to me, but I'll work on it. :)
Subject: kdenetwork/kopete/libkopete CVS commit by brunes: Fix regexp to handle any link type and not barf on @ symbols CCMAIL: 62690-done@bugs.kde.org M +2 -2 kopetemessage.cpp 1.130 --- kdenetwork/kopete/libkopete/kopetemessage.cpp #1.129:1.130 @@ -485,10 +485,10 @@ QString KopeteMessage::parseLinks( const //Replace http/https/ftp links - result.replace( QRegExp( QString::fromLatin1("(?:\\b| )((?:http(?:s?)://\\w|ftp://\\w)[-\\w\\._]+[\\+-\\w\\./#&;:=\\?~%_,]*)(?:\\b| )") ), QString::fromLatin1("<a href=\"\\1\" title=\"\\1\">\\1</a>" ) ); + result.replace( QRegExp( QString::fromLatin1("(?:\\b| )(\\w+://(\\w+\\@){0,1}[\\+-\\w\./#@&;:=\\?~%_,]*)(?:\\b| )") ), QString::fromLatin1("<a href=\"\\1\" title=\"\\1\">\\1</a>" ) ); result.replace( QRegExp( QString::fromLatin1("^(www\\.[-\\w\\._]+[\\+-\\w\\./#&;:=\\?~%_,]*)(?:\\b| )") ), QString::fromLatin1("<a href=\"http://\\1\" title=\"http://\\1\">\\1</a>" ) ); result.replace( QRegExp( QString::fromLatin1("([^/.;,?#=\\-%~])\\b(www\\.[\\+-\\w\\._]+[-\\w\\./#&;:=\\?~%_,]*)(?:\\b| )") ), QString::fromLatin1("\\1<a href=\"http://\\2\" title=\"http://\\2\">\\2</a>" ) ); //Replace Email Links - result.replace( QRegExp( QString::fromLatin1("(?:\\b| )([\\w\\-_\\.]+@(?:[\\+-_\\w\\.]+\\.\\w+)+)(?:\\b| )") ), QString::fromLatin1("<a href=\"mailto:\\1\" title=\"mailto:\\1\">\\1</a>") ); + result.replace( QRegExp( QString::fromLatin1("(?:\\b| )([\\w\\-_\\.]+@(?:[\\+-_\\w\\.]+\\.\\w+)+)(?:\\b| )(?!.*</a>)") ), QString::fromLatin1("<a href=\"mailto:\\1\" title=\"mailto:\\1\">\\1</a>") ); return result;