We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e19184 commit 10b6888Copy full SHA for 10b6888
src/utils/urlDecoder.tsx
@@ -2,7 +2,7 @@ export function extractUrlDomain(input: string): string | null {
2
try {
3
const normalizedInput = input.startsWith('http') ? input : `https://${input}`;
4
const url = new URL(normalizedInput);
5
- return `${url.protocol}//${url.hostname}`; // Inclut le protocole et le domaine
+ return `${url.protocol}//${url.hostname}${url.port ? ':' + url.port : ''}`; // Inclut le protocole et le domaine
6
} catch {
7
return null; // Not a valid URL
8
}
0 commit comments