From c2b4ea28f09167df836f90aaf0b308ae59067d66 Mon Sep 17 00:00:00 2001 From: Rom1-B <8530352+Rom1-B@users.noreply.github.com> Date: Tue, 19 May 2026 10:50:31 +0200 Subject: [PATCH] Fix: render Change analysis and plan fields as HTML in PDF --- CHANGELOG.md | 1 + inc/change.class.php | 29 ++++++++++------------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 813e79f..7b6adae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed table formatting and border in PDF - Fixed table cell size in PDF generation +- Fixed Change analysis and plan fields rendering as raw HTML in PDF ## [4.0.2] - 2025-09-30 diff --git a/inc/change.class.php b/inc/change.class.php index 2d6a8a3..653e84a 100644 --- a/inc/change.class.php +++ b/inc/change.class.php @@ -311,19 +311,15 @@ public static function pdfAnalysis(PluginPdfSimplePDF $pdf, Change $job) $pdf->setColumnsSize(100); $pdf->displayTitle('' . __('Analysis') . ''); - $pdf->setColumnsSize(10, 90); - - $pdf->displayText(sprintf( - __('%1$s: %2$s'), + $pdf->displayText( '' . __('Impacts') . '', $job->fields['impactcontent'], - )); + ); - $pdf->displayText(sprintf( - __('%1$s: %2$s'), + $pdf->displayText( '' . __('Control list') . '', $job->fields['controlistcontent'], - )); + ); } public static function pdfPlan(PluginPdfSimplePDF $pdf, Change $job) @@ -331,25 +327,20 @@ public static function pdfPlan(PluginPdfSimplePDF $pdf, Change $job) $pdf->setColumnsSize(100); $pdf->displayTitle('' . __('Plans') . ''); - $pdf->setColumnsSize(10, 90); - - $pdf->displayText(sprintf( - __('%1$s: %2$s'), + $pdf->displayText( '' . __('Deployment plan') . '', $job->fields['rolloutplancontent'], - )); + ); - $pdf->displayText(sprintf( - __('%1$s: %2$s'), + $pdf->displayText( '' . __('Backup plan') . '', $job->fields['backoutplancontent'], - )); + ); - $pdf->displayText(sprintf( - __('%1$s: %2$s'), + $pdf->displayText( '' . __('Checklist') . '', $job->fields['checklistcontent'], - )); + ); } public static function pdfStat(PluginPdfSimplePDF $pdf, Change $job)