Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pattch opened this issue Nov 3, 2021 · 2 comments · Fixed by #4288
Closed

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

pattch opened this issue Nov 3, 2021 · 2 comments · Fixed by #4288
Labels
Milestone

Comments

@pattch
Copy link
Contributor

pattch commented Nov 3, 2021

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.

@silamon
Copy link
Contributor

silamon commented Jan 29, 2022

> is being matched as the path of the url here: ([^:"\'\\s]).

const pathCharacterSet = '(\\/[\\/\\w\\.\\-%~:+@]*)*([^:"\'\\s])';
const pathClause = '(' + pathCharacterSet + ')?';

@jerch jerch mentioned this issue Dec 8, 2022
4 tasks
@Tyriar
Copy link
Member

Tyriar commented Dec 15, 2022

Seems fixed:

Image

@Tyriar Tyriar closed this as completed Dec 15, 2022
@Tyriar Tyriar added this to the 5.1.0 milestone Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants