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 640727 - Links having a colon in the middle are not selected completely
Links having a colon in the middle are not selected completely
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
: 582899 643060 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-27 14:55 UTC by Tomas Bzatek
Modified: 2012-07-21 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.23 KB, patch)
2011-01-27 14:55 UTC, Tomas Bzatek
committed Details | Review

Description Tomas Bzatek 2011-01-27 14:55:45 UTC
Created attachment 179437 [details] [review]
proposed patch

Originally reported as https://bugzilla.redhat.com/show_bug.cgi?id=655132

Basically having an URL that contains colon (":") in the middle of the link would make gnome-terminal select/underline only the first part of the string up to the colon. Such links are quite common nowadays.

https://fedoraproject.org/wiki/Packaging:RPM_Source_Dir
http://foo.bar/path/with/a/colon:foo

The attached patch modifies regexps so that whole URL is selected properly.
Comment 1 Tomas Bzatek 2011-02-16 13:26:05 UTC
Christian, have you tested the patch under various situations? I made it somewhat blindly, no idea if it breaks anything else. Just being precautious...
Comment 2 Christian Persch 2011-02-16 13:49:45 UTC
Not tested, no; just looks correct.

A test suite for the URL regexes would be good to have :)
Comment 3 Christian Persch 2011-02-23 12:46:20 UTC
*** Bug 643060 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Kojevnikov 2011-07-26 14:27:21 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 582899 ***
Comment 5 Christian Persch 2011-08-02 12:42:31 UTC
Please commit the patch.
Comment 6 Tomas Bzatek 2011-08-02 13:06:51 UTC
commit 1eb9a8283fec7d1cc7492deb53d6705b52538b5c
Author: Tomas Bzatek <tbzatek@redhat.com>
Date:   Tue Aug 2 15:06:14 2011 +0200

    Don't split URL having a colon (":") in the middle
    
    Properly handle links like
    http://foo.bar/path/with/a/colon:foo
    
    This patch also avoids selecting trailing colon.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640727
Comment 7 Tomas Bzatek 2011-08-02 13:07:52 UTC
*** Bug 582899 has been marked as a duplicate of this bug. ***