terminal: Sanitize URLs with characters that cannot be last#43559
Merged
probably-neb merged 7 commits intozed-industries:mainfrom Dec 16, 2025
Merged
Conversation
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Contributor
Author
|
This fix also addresses cases like 'https://test.com/(((' that were not previously covered |
probably-neb
requested changes
Dec 5, 2025
Collaborator
probably-neb
left a comment
There was a problem hiding this comment.
Hey! Thanks for taking the time to work on this!
I think we should make this PR a bit more focused to the issue it's closing, rather than hoping that the additional stripped characters works out fine. I'd rather get an issue report saying "you didn't strip enough" than "you stripped too much and changed the meaning of the url", because the first case is more obviously wrong
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
probably-neb
approved these changes
Dec 15, 2025
Collaborator
probably-neb
left a comment
There was a problem hiding this comment.
Great work! Is this ready to merge?
Contributor
Author
|
@probably-neb thanks, it's ready to be merged! |
CherryWorm
pushed a commit
to CherryWorm/zed
that referenced
this pull request
Dec 16, 2025
…stries#43559) Closes zed-industries#43345 The list of characters comes from the linkify crate, which is already used for URL detection in the editor: https://github.com/robinst/linkify/blob/5239e12e26c633f42323e51ed81b0ff534528077/src/url.rs#L228 Release Notes: - Improved url links detection in terminals. --------- Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #43345
The list of characters comes from the linkify crate, which is already used for URL detection in the editor:
https://github.com/robinst/linkify/blob/5239e12e26c633f42323e51ed81b0ff534528077/src/url.rs#L228
Release Notes: