Skip to content

Terminal link detection improperly detects non-link text regions

Submitted by Remy Goldschmidt

Assigned to Nick Schermer

Link to original bug (#12386)

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:

  1. Run echo "ftp.example"
  2. 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:

Attachment 6573, "The bug (my mouse is over the underlined text, it just wasn't picked up by scrot)":
broken-link-detection

Version: 0.6.2