Bug 206559 - www links are created incorrectly from e-mail text
Summary: www links are created incorrectly from e-mail text
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-06 22:59 UTC by Albert Astals Cid
Modified: 2013-04-14 14:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2009-09-06 22:59:31 UTC
Version:            (using KDE 4.3.1)
Installed from:    Ubuntu Packages

I got a mail whose text (as shown by shown source code option is) 

plugin (www.knovel.com in my case)

with the default view i see

plugin (www.knovel.cominmycase)

and www.knovel.cominmycase is a link to www.knovel.cominmycase

Not sure if it's safe assuming urls should break in spaces, but even if it should not, it should not eat them
Comment 1 Martin Koller 2009-09-08 20:27:32 UTC
This is not a bug, it's a feature ;-)
The URL detection was enhanced regarding RFC 3986, appendix-C http://tools.ietf.org/html/rfc3986#appendix-C
which says
In some cases, extra whitespace (spaces, line-breaks, tabs, etc.) may
   have to be added to break a long URI across lines.  The whitespace
   should be ignored when the URI is extracted.
So the current algorithm skips whitespace until it detects end-of-URL and an URL can be enclosed in different kind of brackets or quotes, e.g. (xx) <xx> [xx] etc.
Comment 2 Albert Astals Cid 2009-09-08 21:06:55 UTC
There's no line break in this case

Also it's "obvious" from a url point of view that www.knovel.cominmycase is incorrect as cominmycase is not a valid domain name, not sure there's a easy way to check logical "validity" of urls

Anyway i'm reopening the bug, i can show it to 100 people and almost 90 (if not 100) will agree it's not the expected behaviour.
Comment 3 Torgny Nyblom 2009-09-09 07:18:28 UTC
I agree that it is not the expected behavior but it is the correct behavior.
The only way to check for valid top level domains would be to check against a list and since the TLDs change this would fail. All other methods will be a "best guess" approach.
Comment 4 Arkadiusz Miskiewicz 2011-01-31 12:01:50 UTC
This bug exists also in kde 4.6.0 + kmail 4.4.10.

Text:
Test (www.aaa.pl, costam, innecostam) test.

is visible as:

Test (www.aaa.pl,costam,innecostam) test.

Spaces are stripped, everyting inside () is treated as link but the link points to nowhere - to "http:" actually (and not even http://www.aaaa.pl,costam,innecostam).

So there are two bugs here.
Comment 5 Laurent Montel 2013-03-01 08:00:19 UTC
Fixed in 4.10.1
Comment 6 Christoph Feck 2013-04-14 14:42:58 UTC
Setting status according to comment #5.