mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Enclose IPv6 addresses in brackets for URL formatting
This commit is contained in:
parent
f2f14b1397
commit
09d310e227
1 changed files with 9 additions and 0 deletions
|
|
@ -22,6 +22,15 @@ namespace Flow.Launcher.Plugin.Url
|
|||
return [];
|
||||
}
|
||||
|
||||
if (IPEndPoint.TryParse(raw, out var endpoint))
|
||||
{
|
||||
if (endpoint.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)
|
||||
{
|
||||
// Enclose IPv6 addresses in brackets for URL formatting
|
||||
raw = $"[{raw}]";
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
[
|
||||
new()
|
||||
|
|
|
|||
Loading…
Reference in a new issue