After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 602875 - Wrong parsing of closing bracket in URL
Wrong parsing of closing bracket in URL
Status: RESOLVED OBSOLETE
Product: empathy
Classification: Core
Component: Chat
2.28.x
Other Linux
: Normal major
: ---
Assigned To: empathy-maint
empathy-maint
: 564735 620820 646973 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-11-24 21:43 UTC by Luca Ferretti
Modified: 2018-05-22 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of this issue (in Italian) (32.55 KB, image/png)
2009-11-24 21:43 UTC, Luca Ferretti
Details
Great!!! Firefox does the same. See previous comment or newly attached screenshot (22.37 KB, image/png)
2009-11-24 21:46 UTC, Luca Ferretti
Details

Description Luca Ferretti 2009-11-24 21:43:42 UTC
Created attachment 148415 [details]
Screenshot of this issue (in Italian)

If you type an URL with a closing bracket - instance http://it.wikipedia.org/wiki/Luca_(nome) - in empathy chat window the actual link target is the same URL without the closing bracket - i.e. http://it.wikipedia.org/wiki/Luca_(nome -

Steps to reproduce:
 1) start chatting
 2) type a link with a closing bracket

Results
 see attached screenshot

More info
 Unchecked for adium themes.
Comment 1 Luca Ferretti 2009-11-24 21:46:49 UTC
Created attachment 148416 [details]
Great!!! Firefox does the same. See previous comment or newly attached screenshot
Comment 2 Xavier Claessens 2009-11-24 22:42:28 UTC
This is a known issue. Our parser is not very smart, it should count opening and closing brackets. Otherwise we can't decide between:

(http://foo.com)
and
http://foo.com/test(me)

I don't think there is already a program doing both cases correctly.

This bug could be a dup, I remember it was already reported. At least my "escape" branch[1] provides a good refactor and unit tests for those cases. It's a good base to fix this issue.

[1] http://git.collabora.co.uk/?p=user/xclaesse/empathy.git;a=shortlog;h=refs/heads/escape
Comment 3 Sumana Harihareswara 2009-12-01 03:12:04 UTC
*** Bug 564735 has been marked as a duplicate of this bug. ***
Comment 4 Sumana Harihareswara 2009-12-01 03:14:20 UTC
http://daringfireball.net/2009/11/liberal_regex_for_matching_urls provides this regex for URI-matching:

\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))


"This pattern attempts to be practical. It makes no attempt to parse URLs according to any official specification. It isn’t limited to predefined URL protocols. It should be clever about things like parentheses and trailing punctuation...."
Comment 5 Frederic Peters 2010-06-07 11:42:51 UTC
*** Bug 620820 has been marked as a duplicate of this bug. ***
Comment 6 Will Thompson 2012-06-27 10:58:06 UTC
*** Bug 646973 has been marked as a duplicate of this bug. ***
Comment 7 Will Thompson 2012-06-27 10:59:11 UTC
Jonny noticed that Gnome Shell uses a different algorithm which does the right thing with Wikipedia links. Maybe they should be in sync, one way or another?
Comment 8 Xavier Claessens 2012-06-27 11:10:48 UTC
Every project has their own way of doing this, and they are all broken in some way. But I did not check what gnome-shell does...
Comment 9 GNOME Infrastructure Team 2018-05-22 13:51:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/145.