diff --git a/syncplay/client.py b/syncplay/client.py index a9fce18..9f32127 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -468,6 +468,7 @@ class SyncplayClient(object): self.fileSwitchFoundFiles() self.ui.showMessage("Trusted domains updated") # TODO: Properly add message for setting trusted domains! + # TODO: Handle cases where users add www. to start of domain def isUntrustedTrustableURI(self, URIToTest): if utils.isURL(URIToTest): diff --git a/syncplay/utils.py b/syncplay/utils.py index dca6449..87164a5 100644 --- a/syncplay/utils.py +++ b/syncplay/utils.py @@ -252,7 +252,10 @@ def convertMultilineStringToList(multilineString): def getDomainFromURL(URL): try: - return URL.split("//")[-1].split("/")[0] + URL = URL.split("//")[-1].split("/")[0] + if URL.startswith("www."): + URL = URL[4:] + return URL except: return None