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

fix: encode url before opening #3804

Merged
merged 1 commit into from
Sep 27, 2021
Merged

Conversation

wraithgar
Copy link
Member

will filter out a small subset of non-URL-safe characters that still
parse properly with new URL

Credit: @isaacs

@wraithgar wraithgar requested a review from a team as a code owner September 27, 2021 17:06
Copy link
Contributor

@isaacs isaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! (unsurprisingly, perhaps)

will filter out a small subset of non-URL-safe characters that still
parse properly with `new URL`

PR-URL: #3804
Credit: @isaacs
Close: #3804
Reviewed-by: @wraithgar
@wraithgar wraithgar merged commit 56d6cfd into release-next Sep 27, 2021
@wraithgar wraithgar deleted the gar/windows-open-url branch September 27, 2021 17:18
This was referenced Sep 30, 2021
@QLiMBer
Copy link

QLiMBer commented Nov 4, 2021

It seems this change has broken "npm help whatever" functionality, as the encoded URI doesn't pass check in line 28:
if (!/^(https?|file):$/.test(new URL(url).protocol))

If the new line 7 which encodes URI commented, npm help commands work fine again.
See https://stackoverflow.com/questions/69833995/npm-help-update-in-windows-giving-invalid-url-error/

@wraithgar
Copy link
Member Author

#3941

@ooker777
Copy link

2 years have passed and this is still unfixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants