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

open escapes # when there are spaces in the URL #274

Closed
martin-braun opened this issue Jan 28, 2022 · 4 comments
Closed

open escapes # when there are spaces in the URL #274

martin-braun opened this issue Jan 28, 2022 · 4 comments

Comments

@martin-braun
Copy link

open("https://google.com#test 123");

will open https://google.com%23test%20123 when it should open https://google.com#test%20123. Edgy case, but threw me off.

Would be nice if this would be fixed for the next poor guy searching for a way to disable escaping.

@sindresorhus
Copy link
Owner

What operating system?

@martin-braun
Copy link
Author

martin-braun commented Feb 1, 2022

@sindresorhus Sorry, forgot to mention.

macOS 12.1 (21C52)

@sindresorhus
Copy link
Owner

Looking closer at this, it's working as expected. Unescaped space is not valid in an URL.

The native open also works this way:

command open 'https://google.com#test 123'

@martin-braun
Copy link
Author

martin-braun commented Feb 1, 2022

Well that's interesting. I thought I spotted a bug, but yes, it is no valid URL anyways. Well then it's fine I guess.

Thanks for looking into it.

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

No branches or pull requests

2 participants