-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Improve Open-with URL encoding #33666
Improve Open-with URL encoding #33666
Conversation
import {substituteRepoOpenWithUrl} from './repo-common.ts'; | ||
|
||
test('substituteRepoOpenWithUrl', () => { | ||
expect(substituteRepoOpenWithUrl('proto://a/{url}', 'https://gitea')).toEqual('proto://a/https://gitea'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm, what?
Is that really a valid URL?
It looks wrong to me…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is a valid URL according to URL standard:
> new URL("proto://a/https://gitea")
URL {
href: 'proto://a/https://gitea',
origin: 'null',
protocol: 'proto:',
username: '',
password: '',
host: 'a',
hostname: 'a',
port: '',
pathname: '/https://gitea',
search: '',
searchParams: URLSearchParams {},
hash: ''
}
BTW could move the function to |
Please do not do that. This function is specialized for the "open-with" links only, it doesn't make sense to move it to a global TS file. |
* giteaofficial/main: Fix git empty check and HEAD request (go-gitea#33690) Fix some user name usages (go-gitea#33689) Try to fix ACME path when renew (go-gitea#33668) [skip ci] Updated translations via Crowdin Improve Open-with URL encoding (go-gitea#33666) Fix for Maven Package Naming Convention Handling (go-gitea#33678) Improve swagger generation (go-gitea#33664) Deleting repository should unlink all related packages (go-gitea#33653)
Fix #33665