@@ -142,7 +142,8 @@ class EditLink(ManagedWindow):
|
|||||||
def update_ui(self, widget):
|
def update_ui(self, widget):
|
||||||
url = self.url_link.get_text()
|
url = self.url_link.get_text()
|
||||||
# text needs to have 3 or more chars://and at least one char
|
# 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:
|
if match:
|
||||||
self.ok_button.set_sensitive(True)
|
self.ok_button.set_sensitive(True)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user