In "add trusted domain" options use version without www.

This commit is contained in:
Et0h 2016-10-18 00:23:57 +01:00
parent f38feb05a8
commit 38a41123db
2 changed files with 5 additions and 1 deletions

View File

@ -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):

View File

@ -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