From aadc8aa96118a6c38d37fab015f1d27d0bfbd994 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:18:56 +1300 Subject: [PATCH] FIX Correctly validate emails in WYSIWYG links (#1710) --- code/Forms/EditorEmailLinkFormFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/Forms/EditorEmailLinkFormFactory.php b/code/Forms/EditorEmailLinkFormFactory.php index 02c8adc76..25a3eba0f 100644 --- a/code/Forms/EditorEmailLinkFormFactory.php +++ b/code/Forms/EditorEmailLinkFormFactory.php @@ -2,6 +2,7 @@ namespace SilverStripe\Admin\Forms; +use SilverStripe\Forms\EmailField; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\TextField; use SilverStripe\Forms\RequiredFields; @@ -11,7 +12,7 @@ class EditorEmailLinkFormFactory extends LinkFormFactory protected function getFormFields($controller, $name, $context) { $fields = FieldList::create([ - TextField::create( + EmailField::create( 'Link', _t(__CLASS__.'.EMAIL', 'Email address') ),