Add a mailto choice to Internet Address

Fixes #11149
This commit is contained in:
SNoiraud 2019-05-14 22:26:17 +02:00 committed by Nick Hall
parent 75d2f3dd00
commit e6324fe3d8

View File

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