[PATCH] better email address check for KTextBrowser
Tobias Koenig
tokoe at kde.org
Fri Jun 24 18:11:45 BST 2005
Hi,
the attached patch does a better check for email since it doesn't test
for a '@' which could also be part of a url (http://user@host.de) or
another string (skype address) but for a valid email link address
starting with 'mailto:'.
Ok for commit?
Ciao,
Tobias
--
Separate politics from religion and economy!
The Councile of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
Index: ktextbrowser.cpp
===================================================================
--- ktextbrowser.cpp (Revision 428602)
+++ ktextbrowser.cpp (Arbeitskopie)
@@ -60,7 +60,7 @@
return;
}
- if( name.find('@') > -1 )
+ if( name.startsWith("mailto:") )
{
if( !mNotifyClick )
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050624/1ba1ebf7/attachment.sig>
More information about the kde-core-devel
mailing list