GNOME Bugzilla – Bug 570037
Does not properly link URL's with underscores
Last modified: 2016-02-02 21:11:02 UTC
Please describe the problem: This was reported at https://bugs.edge.launchpad.net/ubuntu/+source/gnome-terminal/+bug/323713: "In my GNOME Terminál 2.24.1.1 I wanted to open the URL http://phoenix_art.wps4.info/node/41 Only the http://phoenix was highlighted and shown in the browser" I can also recreate on 2.25.5 Steps to reproduce: 1. Click on a URL that contains an underscore in gnome-terminal Actual results: Only the first part of the URL (before the underscore) is linked Expected results: The whole URL should work Does this happen every time? Yes Other information:
RFC 2396 says that '_' is not legal in hostnames in URIs: host = hostname | IPv4address hostname = *( domainlabel "." ) toplabel [ "." ] domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum toplabel = alpha | alpha *( alphanum | "-" ) alphanum
Maybe, but in the local part of an email addresses, the underscore is a legal character, and g-t doesn't handle it properly, as of today.
That can certainly be fixed, but it isn't what this bug report is about.
Comment 2 was split off into bug 570898; the original problem in comment 0 is INVALID.
Hostnames may not allow underscores, but domain names certainly do (as evidenced by services that use them, and browsers that resolve them). According to http://stackoverflow.com/a/2183140 the relevant RFC is RFC 1034, not RFC 2396. Even if it were in violation of the appropriate RFCs, these URLs exist in the wild, and gnome-terminal could still support linking to them.