From 9bcb65596c8f337be44becdc5b6d407a46681a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Mon, 16 Dec 2024 12:01:53 +0200 Subject: [PATCH 1/2] UHF-11076.1: prevent encoded characters on filled application preview --- .../src/Plugin/WebformElement/ApplicantInfoComposite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/modules/custom/grants_applicant_info/src/Plugin/WebformElement/ApplicantInfoComposite.php b/public/modules/custom/grants_applicant_info/src/Plugin/WebformElement/ApplicantInfoComposite.php index 12a8ece1b..66aba20ea 100644 --- a/public/modules/custom/grants_applicant_info/src/Plugin/WebformElement/ApplicantInfoComposite.php +++ b/public/modules/custom/grants_applicant_info/src/Plugin/WebformElement/ApplicantInfoComposite.php @@ -97,7 +97,7 @@ protected function formatTextItemValue(array $element, WebformSubmissionInterfac $webformElement = $element["#webform_composite_elements"][$fieldName]; if ($webformElement && isset($webformElement['#title'])) { $lines[] = '
' . $webformElement['#title']->render() . '
'; - $lines[] = '
' . $fieldValue . '
'; + $lines[] = '
' . htmlspecialchars_decode($fieldValue) . '
'; } } } From 58b80c4d1cb219288e37917ff8738718006c7654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Nyk=C3=A4nen?= Date: Mon, 16 Dec 2024 12:56:43 +0200 Subject: [PATCH 2/2] UHF-11076.1: this is not worth an error --- public/modules/custom/grants_handler/grants_handler.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/modules/custom/grants_handler/grants_handler.module b/public/modules/custom/grants_handler/grants_handler.module index df4f2a8c1..d744c602e 100644 --- a/public/modules/custom/grants_handler/grants_handler.module +++ b/public/modules/custom/grants_handler/grants_handler.module @@ -1559,7 +1559,7 @@ function grants_handler_preprocess_application_list_item(&$variables): void { } else { \Drupal::logger('grants_handler') - ->error('Application status not in valid statuses: %number', [ + ->info('Application status not in valid statuses: %number', [ '%number' => $submissionData["application_number"], ]); } @@ -1611,7 +1611,7 @@ function grants_handler_preprocess_application_status_tag(&$variables): void { } else { \Drupal::logger('grants_handler') - ->error('Application status not in valid statuses: %appno', [ + ->info('Application status not in valid statuses: %appno', [ '%appno' => $submissionData["application_number"], ]); }