From 3dc81700c1f0472b3373b772f6e8bce5275c9d93 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 24 Mar 2020 04:08:00 -0400 Subject: [PATCH] Correct mailto: linkifying in some special cases adresses where the host ends with a digit or where the host is only one character --- src/backend/html_markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/html_markdown.py b/src/backend/html_markdown.py index 9fe1d313..49cf5116 100644 --- a/src/backend/html_markdown.py +++ b/src/backend/html_markdown.py @@ -132,7 +132,7 @@ class HTMLProcessor: r"(?:/[/\-_.,a-z\d#%&?;=~]*)?(?:\([/\-_.,a-z\d#%&?;=~]*\))?)"), # mailto: and tel: - r"mailto:(?P[a-z0-9._-]+@(?P[a-z0-9_.-]+[a-z](?:\:\d+)?))", + r"mailto:(?P[a-z0-9._-]+@(?P[a-z0-9.-:]*[a-z\d]))", r"tel:(?P[0-9+-]+)(?P)", # magnet: