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

Replace UtilityService.punyHost(url) with new URL(url).host #15163

Open
saschanaz opened this issue Dec 21, 2024 · 0 comments · May be fixed by #15164
Open

Replace UtilityService.punyHost(url) with new URL(url).host #15163

saschanaz opened this issue Dec 21, 2024 · 0 comments · May be fixed by #15164

Comments

@saschanaz
Copy link
Member

public punyHost(url: string): string {
const urlObj = new URL(url);
const host = `${this.toPuny(urlObj.hostname)}${urlObj.port.length > 0 ? ':' + urlObj.port : ''}`;
return host;
}

new URL("https://mañana.com:8080").host === 'xn--maana-pta.com:8080' になるのでtoPunyurlObj.port使う必要はなさそうです

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

Successfully merging a pull request may close this issue.

1 participant