diff --git a/tagstudio/src/core/utils/web.py b/tagstudio/src/core/utils/web.py index d42ef782..f1767693 100644 --- a/tagstudio/src/core/utils/web.py +++ b/tagstudio/src/core/utils/web.py @@ -6,6 +6,5 @@ def strip_web_protocol(string: str) -> str: """Strips a leading web protocol (ex. \"https://\") as well as \"www.\" from a string.""" prefixes = ['https://','http://','www.','www2.'] for prefix in prefixes: - if string.startswith(prefix): - string = string.replace(prefix, '') + string = string.removeprefix(prefix) return string