From e583dc0a7ff7e183062f49cb56eb887df1cfd758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 15 May 2020 18:07:17 +0200 Subject: [PATCH] enhance free email --- htdocs/core/class/html.form.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 999e0463789..d6a4c437c50 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6690,6 +6690,14 @@ class Form text: $.trim(match[1]) + " <" + match[2] + ">" } } + var match = params.term.match(new RegExp("^" + REGEX_EMAIL + "$", "i")); + // console.log(match); + if (match !== null) { + return { + id: $.trim(match[1]) + " <" + match[1] + ">", + text: $.trim(match[1]) + " <" + match[1] + ">" + } + } return null; }'; }