Terminal link detection improperly detects non-link text regions
Submitted by Remy Goldschmidt
Assigned to Nick Schermer
Description
Created attachment 6573 The bug (my mouse is over the underlined text, it just wasn't picked up by scrot)
Note: The bug tracker didn't give me an option for version 0.6.3 (the version I am running) so I put 0.6.2 as my version.
I am running xfce4-terminal on NixOS unstable (SVN revision: 73316.93d8671). NixOS builds xfce4-terminal from the source at [1]. NixOS doesn't use any flags in building xfce4-terminal; it just does ./configure --prefix=...; make; make install
.
To reproduce the bug, open xfce4-terminal and do the following:
- Run
echo "ftp.example"
- Move your mouse pointer over the echoed text
The bug is that the string "ftp.example" is recognized as a link, even though it clearly isn't one.
The relevant code is in <source-root>/terminal/terminal-widget.c
(linked at [2]).
Potential fixes:
- Modify the link-detection code to use one of the regexes from [3] --- preferably one with better edge case handling.
- Write a proper parser for links based on RFC 1738 [4] (this may be similarly buggy).
Links:
- [1] --- http://archive.xfce.org/src/apps/xfce4-terminal/0.6/xfce4-terminal-0.6.3.tar.bz2
- [2] --- https://bazaar.launchpad.net/~vcs-imports/xfce4-terminal/trunk/view/head:/terminal/terminal-widget.c
- [3] --- https://mathiasbynens.be/demo/url-regex
- [4] --- https://www.ietf.org/rfc/rfc1738.txt
Attachment 6573, "The bug (my mouse is over the underlined text, it just wasn't picked up by scrot)":
Version: 0.6.2