From 4ab788acc1b427de153cfb4bdc65c4626b07b267 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 26 Oct 2023 10:09:44 -0600 Subject: [PATCH] Et2SelectEmail: Fix pasting in merge placeholders didn't do anything --- api/js/etemplate/Et2Select/Select/Et2SelectEmail.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Select/Select/Et2SelectEmail.ts b/api/js/etemplate/Et2Select/Select/Et2SelectEmail.ts index d393a0ef9f..af630407ec 100644 --- a/api/js/etemplate/Et2Select/Select/Et2SelectEmail.ts +++ b/api/js/etemplate/Et2Select/Select/Et2SelectEmail.ts @@ -290,8 +290,9 @@ export class Et2SelectEmail extends Et2Select selection.deleteFromDocument(); } + let preg = this.allowPlaceholder ? IsEmail.EMAIL_PLACEHOLDER_PREG : IsEmail.EMAIL_PREG; // Trim line start / end anchors off validation regex, make global - let regex = new RegExp(IsEmail.EMAIL_PREG.toString().substring(2, IsEmail.EMAIL_PREG.toString().length - 3), 'g'); + let regex = new RegExp(preg.toString().substring(2, preg.toString().length - 3), 'g'); let values = paste.match(regex); values.forEach(v => {