clan-vm-manager: Fix regression part2
This commit is contained in:
@@ -81,7 +81,7 @@ class ClanURI:
|
||||
if machine_name:
|
||||
uri += f"#{machine_name}"
|
||||
|
||||
# users might copy whitespace along with the uri
|
||||
# Users might copy whitespace along with the URI
|
||||
uri = uri.strip()
|
||||
|
||||
# Check if the URI starts with clan://
|
||||
@@ -90,6 +90,12 @@ class ClanURI:
|
||||
if uri.startswith(prefix):
|
||||
uri = uri[len(prefix) :]
|
||||
|
||||
# Fix missing colon (caused by browsers like Firefox)
|
||||
if "//" in uri and ":" not in uri.split("//", 1)[0]:
|
||||
# If there's a `//` but no colon before it, add one before the `//`
|
||||
parts = uri.split("//", 1)
|
||||
uri = f"{parts[0]}://{parts[1]}"
|
||||
|
||||
# Parse the URI into components
|
||||
# url://netloc/path;parameters?query#fragment
|
||||
components: urllib.parse.ParseResult = urllib.parse.urlparse(uri)
|
||||
|
||||
Reference in New Issue
Block a user