[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kopete/libkopete
From:       Ladislav Strojil <Ladislav () Strojil ! cz>
Date:       2003-07-23 17:28:52
[Download RAW message or body]

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("<a href=\"\\1\">\\1</a>" ) ); +        result.replace( \
QRegExp( QString::fromLatin1("\\b((http://\\w|ftp://\\w|https://\\w)[-\\w\\._]+[-\\w\\./#&;:=\\?~%_,]*)\\b") \
), QString::fromLatin1("<a href=\"\\1\">\\1</a>" ) ); +        result.replace( \
QRegExp( QString::fromLatin1("\\b((www\\.)[-\\w\\._]+[-\\w\\./#&;:=\\?~%_,]*)\\b") ), \
QString::fromLatin1("<a href=\"http://\\1\">\\1</a>" ) );  
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic