gnome-terminal doesn't match nntp or file URLs.

Bug #18553 reported by Ralph Corderoy
8
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Fix Released
Low
Sebastien Bacher

Bug Description

gnome-terminal 2.10.0-0ubuntu doesn't match URLs with a scheme of `nntp'
or `file' making it tedious to open said links in a browser. I think
this is because

    $ grep 'define SCHEME' gnome-terminal-2.10.0/src/terminal-screen.c
    #define SCHEME "(news|telnet|nttp|file|https?|ftps?|webcal)"

`nttp' is probably meant to be `nntp' and `file' is omitted.

http://bugzilla.gnome.org/show_bug.cgi?id=309201: http://bugzilla.gnome.org/show_bug.cgi?id=309201

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug, what is the issue with "file"? I've forwarded it upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=309201

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

(In reply to comment #1)
> Thanks for your bug, what is the issue with "file"?

Oops. You're right, `file' isn't missing from SCHEME's definition. The
problem is the regular expression that uses SCHEME.

    #define USERCHARS "-A-Za-z0-9"
    #define PASSCHARS "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
    #define HOSTCHARS "-A-Za-z0-9"
    #define SCHEME "(news|telnet|nttp|file|https?|ftps?|webcal)"
    #define USER "[" USERCHARS "]+(:["PASSCHARS "]+)?"

      terminal_widget_match_add (screen->priv->term,
          "\\<(" SCHEME "://(" USER "@)?)[" HOSTCHARS ".]+(:[0-9]+)?"
          "(/[-A-Za-z0-9_$.+!*(),;:@&=?/~#%]*[^]'.}>) \t\r\n,\\\"])?\\>",
          FLAVOR_AS_IS);

It insists on there being one or more of [HOSTCHARS.] after the first
two slashes so it fails to match `file:///etc/passwd'. I don't know if
any other of the listed schemes can also have `///'.

> I've forwarded it upstream:
> http://bugzilla.gnome.org/show_bug.cgi?id=309201

OK, what's the convention? Do I continue to add to this bug knowing
that they'll read it, e.g. the above explanation?

Revision history for this message
Sebastien Bacher (seb128) wrote :

I forward useful information to upstream, they came to the same conclusion
during the time to reply here

Revision history for this message
Sebastien Bacher (seb128) wrote :

as a note you can directly use bugzilla.gnome.org for upstream bug too

Revision history for this message
Sebastien Bacher (seb128) wrote :

fixed upstream

Revision history for this message
Daniel Holbach (dholbach) wrote :

 gnome-terminal (2.13.2-0ubuntu1) dapper; urgency=low
 .
   * New upstream release:
     - Added a close button on the tabs
     - Fix bug #139332 - don't use anti-aliased fonts when XRENDER is not
       available [patch by Kiran Kumar Immidi]
     - Fix bug #321952 - set the http_proxy environment variable using GNOME
       proxy settings [patch by John Spray]
     - Fix bug #152986 - don't change the window title if the user has
       manually set
     - Update from libegg
     - Fix bug #129889 - mark the visible name of the profile translatable
     - Fix bug #158319 - fix building from the src directory [patch by
       Marco Pesenti Gritti]
     - Fix bug #324246 - fix regexp for URL highlighting [patch by Gary Coady]
     - Make the S/Key request dialog more HIG compliant
     - Fix bug #310529 - add support for one-time passwords [based on patch by
       Michele Baldessari]
     - Fix bug #100038 - move out markup from translatable string
     - Fix bug #309201 - fix file:// URIs (Ubuntu: #12285)
     - Fix bug #324965 - set icon title when setting window title
     - Fix bug #310137 - add tooltips to the tabs
     - New, updated and fixed translations: bg [Vladimir Petkov], da [Lasse
       Bang Mikkelsen], de [Hendrik Brandt], en_CA [Adam Weinberger], es
       [Francisco Javier F. Serrador], et [Ivar Smolin], fi [Ilkka Tuohela],
       gl [Ignacio Casal Quinteiro], gu [Ankit Patel], ja [Takeshi AIHANA],
       nb [Kjartan Maraas], nl [Tino Meinen], no [Kjartan Maraas], pt_BR
       [Guilherme de S. Pastore], sr [Слободан Д. Средојевић], th [Theppitak
       Karoonboonyanan], vi [Clytie Siddall]

Changed in gnome-terminal:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.