#426592 gnome-terminal: URL detection mechanism flaw

Package:
gnome-terminal
Source:
gnome-terminal
Description:
GNOME terminal emulator application
Submitter:
Ron
Date:
2024-11-23 12:09:06 UTC
Severity:
normal
Tags:
#426592#5
Date:
2007-05-29 19:34:24 UTC
From:
To:
Put "http://en.wikipedia.org/wiki/Moore's_law" in a terminal without the quotes. Move cursor over URL. "'s_law" is not part of the URL according to gnome-terminal. This is a flaw.
#426592#12
Date:
2012-01-26 18:50:43 UTC
From:
To:
I've found a similar URL parsing flaw. Type the following in to a
gnome-terminal:

xxxftpxxx.xxx.xxx

The "ftpxxx.xxx.xxx" part highlights as a URL, even though it's not a valid
URL format and skips the first "xxx". It's as if the parser is just looking
for something like /\S*ftp\S*\.\S*/. Should be more like /\s
+ftp:\/\/\S*\.\S*/, or better yet, I'm sure there's a URL parsing library
somewhere which has real rules for this stuff.