xterm.js
xterm.js copied to clipboard
Web Links Provider shouldn't accept "<>" Characters in opening / ending Clauses
Details
- Browser and browser version: All
- OS version: All
Steps to reproduce
- Enter
$ echo "\<http://test.com\>" - Hover over the link printed on the next line, which should be
<http://test.com> - 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.
> 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
Seems fixed:
