xterm.js icon indicating copy to clipboard operation
xterm.js copied to clipboard

Web Links Provider shouldn't accept "<>" Characters in opening / ending Clauses

Open pattch opened this issue 4 years ago • 1 comments

Details

  • Browser and browser version: All
  • OS version: All

Steps to reproduce

  1. Enter $ echo "\<http://test.com\>"
  2. Hover over the link printed on the next line, which should be <http://test.com>
  3. Observe that the link that is validated corresponds to http://test.com> which doesn't make much sense

Simply adding the <> characters to NEGATED_PATH_CHARACTER_SET and NEGATED_DOMAIN_CHARACTER_SET somewhat resolves this issue, but also has the issue that the test case above won't validate the link inside of the <> brackets as well.

pattch avatar Nov 03 '21 17:11 pattch

> is being matched as the path of the url here: ([^:"\'\\s]). https://github.com/xtermjs/xterm.js/blob/6c18b7f2cc91b923e765b03e572f9038e294d368/addons/xterm-addon-web-links/src/WebLinksAddon.ts#L18-L19

silamon avatar Jan 29 '22 15:01 silamon

Seems fixed:

Image

Tyriar avatar Dec 15 '22 16:12 Tyriar