Skip to content

Preserve slashes when encoding repo in url #1

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

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

max-programming
Copy link
Contributor

When clicking on any file, the url looks like this

https://github.com/[username]%2F[repo-name]/blob/main/[file] and causes a 404

Slashes are also encoded in the user/repo part
This PR solves that issue

@mgks mgks self-assigned this Apr 7, 2025
@mgks mgks added the bug Something isn't working label Apr 7, 2025
Copy link
Owner

@mgks mgks left a comment

Choose a reason for hiding this comment

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

Glad you noticed the issue.

But there's a little better approach we can take here. We need encoding for other methods also including history.pushState to update web address. While we already had the repo variable with proper structure that we can simply leverage.

Thanks for the commit. 👍🏼

@mgks mgks merged commit e92d587 into mgks:main Apr 7, 2025
@mgks
Copy link
Owner

mgks commented Apr 7, 2025

@max-programming changes are live now and your contribution with username will be added to the next release bug fixes. ✌🏼

@max-programming max-programming deleted the patch-1 branch April 8, 2025 18:13
@max-programming
Copy link
Contributor Author

Totally get it. And thanks a lot @mgks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants