fixed incorrect code order, handle @ chars correctly

This commit is contained in:
Riccardo Spagni 2015-02-11 21:40:58 +02:00
parent ab6837485f
commit 67b39e67d4
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 3 additions and 1 deletions

View File

@ -104,11 +104,13 @@ class Plugin(BasePlugin):
return
if self.win.payto_e.is_multiline(): # only supports single line entries atm
return
url = str(self.win.payto_e.toPlainText())
url = url.replace('@', '.') # support email-style addresses, per the OA standard
if url == self.win.previous_payto_e:
return
self.win.previous_payto_e = url
url = url.replace('@', '.') # support email-style addresses, per the OA standard
if ('.' in url) and (not '<' in url) and (not ' ' in url):
if not OA_READY: # handle a failed DNSPython load