From f3720bb4dc4769070a1a91ffde649276675b0661 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Thu, 20 Jun 2024 12:19:02 +0200 Subject: [PATCH] [#200] Disable purification of template field that destroys HTML templates --- CRM/Admin/Form/DonrecProfile.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CRM/Admin/Form/DonrecProfile.php b/CRM/Admin/Form/DonrecProfile.php index 36e946a..5b298b7 100644 --- a/CRM/Admin/Form/DonrecProfile.php +++ b/CRM/Admin/Form/DonrecProfile.php @@ -618,6 +618,16 @@ public function validate() { /** * Process the form submission. */ + + /** + * {@inheritDoc} + */ + protected function getFieldsToExcludeFromPurification(): array { + // Prevent HTML template from being sanitized. + // @see \CRM_Core_Form::setPurifiedDefaults() + return ['template']; + } + public function postProcess() { $session = CRM_Core_Session::singleton();