From f9b4f37d4aa5a0497bf41f618e065e3aa12236ea Mon Sep 17 00:00:00 2001 From: lilHermit Date: Fri, 4 Oct 2024 16:07:20 +0100 Subject: [PATCH] Fixed mail-to regex allowing email addresses to have dots & hyphen as part of the user segment Fixes #5080 --- config/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/src/config.rs b/config/src/config.rs index 70a77d8db6c..de5710ebe35 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -1670,7 +1670,7 @@ pub fn default_hyperlink_rules() -> Vec { // and include terminating ), / or - characters, if any hyperlink::Rule::new(r"\b\w+://\S+[)/a-zA-Z0-9-]+", "$0").unwrap(), // implicit mailto link - hyperlink::Rule::new(r"\b\w+@[\w-]+(\.[\w-]+)+\b", "mailto:$0").unwrap(), + hyperlink::Rule::new(r"\b[\w\.-]+@[\w-]+(\.[\w-]+)+\b", "mailto:$0").unwrap(), ] }