Bug 37833 - parenthesis break URL highlighing in messages
Summary: parenthesis break URL highlighing in messages
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: messageviewer (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 140367 145075 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-05 03:18 UTC by Ivan
Modified: 2009-08-23 17:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2002-02-05 03:15:37 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kmail
Version:           KDE 2.9.1 CVS/CVSup/Snapshot
Severity:          normal
Installed from:    Compiled sources
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

http:// links are broken in messages due to parenthesis ()

example: 
http://redhat.com/~mingo/O(1)-scheduler/sched-O1-2.4.18-pre7-K2.patch
clicking this link in a message goes to this url: http://redhat.com/~mingo/O

so it gets broken just before the parenthesis

this happens from a cvsup snapshot from last week of january aprox.

(Submitted via bugs.kde.org)
Comment 1 Ismail Donmez 2005-12-11 21:56:54 UTC
Still broken in KMail 1.9.1
Comment 2 Eckhart Wörner 2007-01-27 00:57:24 UTC
Still not working in KMail 1.9.6
Comment 3 Eckhart Wörner 2007-01-27 00:58:57 UTC
*** Bug 140367 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Marten 2007-01-27 11:02:58 UTC
Related to bug 81281.  Could easily be fixed, but not just by extending the accepted characters - otherwise text like this:

  Try my kewl new web site (http://www.leet.com)!

would match more than wanted.  If brackets/parentheses are to be accepted, then they should be counted and balanced - but it's not possible to do that with a simple regexp match.
Comment 5 Thomas McGuire 2007-05-05 22:03:29 UTC
*** Bug 145075 has been marked as a duplicate of this bug. ***
Comment 6 Maciej Pilichowski 2007-05-05 22:19:46 UTC
Jonathan, you mean the external brackets should be counted? It leads to parsing the whole message -- would it not slow down displaying it?

I would opt only for checking the "opening" character before http, if it is [({ cut the last one if it is only a counterpart. 
Comment 7 Ronny Standtke 2007-05-05 22:20:34 UTC
> but it's not possible to do that with a simple regexp match.

Konqueror does it right. Why don't KMail just use the same mechanism as Konqueror and everything is fine. This bug is now more than fife years old, please ...
Comment 8 Ronny Standtke 2007-05-06 12:09:50 UTC
> Konqueror does it right.

I quote myself here after I noticed how stupid my statement was. I need some sleep :-) Konqueror does it right because of the provided HTML tags, KMail does not have those tags and must parse/guess... Sorry for my nonsense.
Comment 9 Jonathan Marten 2007-05-08 13:30:34 UTC
Regarding comment #6, that won't work in cases such as:

  Try my kewl new web site (click on http://www.leet.com)!

Counting brackets shouldn't involve scanning the entire message - they only need to be counted and properly balanced within the URL.  This would fix the two examples in this and bug 145075, at least.
Comment 10 Thomas McGuire 2009-08-23 17:42:58 UTC
Works with KDE 4.3.1, including the case of the last comment.