parent
75d2f3dd00
commit
e6324fe3d8
@ -142,7 +142,8 @@ class EditLink(ManagedWindow):
|
||||
def update_ui(self, widget):
|
||||
url = self.url_link.get_text()
|
||||
# text needs to have 3 or more chars://and at least one char
|
||||
match = re.match(r"\w{3,}://\w+", url)
|
||||
# valid internet address are: http://, https://, ftp:// and mailto:
|
||||
match = re.match(r"(\w{3,}://\w+|mailto:\w+)", url)
|
||||
if match:
|
||||
self.ok_button.set_sensitive(True)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user