From fb50a3ffef971adefe7d827293c8ff0e0ee551d8 Mon Sep 17 00:00:00 2001
From: Rom1-B <8530352+Rom1-B@users.noreply.github.com>
Date: Mon, 27 Jul 2026 10:03:15 +0200
Subject: [PATCH 1/2] Fix: restore image rendering in change/problem/task PDF
descriptions
---
CHANGELOG.md | 6 ++++++
inc/change.class.php | 2 +-
inc/problem.class.php | 2 +-
inc/problemtask.class.php | 2 +-
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad7b5ef..4850b94 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [Unreleased]
+
+### Fixed
+
+- Fix image rendering in Change/Problem descriptions and Problem task PDF exports
+
## [4.1.3] - 2026-06-24
### Fixed
diff --git a/inc/change.class.php b/inc/change.class.php
index f66e41a..a9f436b 100644
--- a/inc/change.class.php
+++ b/inc/change.class.php
@@ -298,7 +298,7 @@ public static function pdfMain(PluginPdfSimplePDF $pdf, Change $job)
$pdf->displayText(
'' . sprintf(__s('%1$s: %2$s') . '', __s('Description'), ''),
- Toolbox::stripTags($job->fields['content']),
+ $job->fields['content'],
1,
);
diff --git a/inc/problem.class.php b/inc/problem.class.php
index f2ce73b..2484950 100644
--- a/inc/problem.class.php
+++ b/inc/problem.class.php
@@ -298,7 +298,7 @@ public static function pdfMain(PluginPdfSimplePDF $pdf, Problem $job)
$pdf->displayText(
'' . sprintf(__s('%1$s: %2$s'), __s('Description') . '', ''),
- Toolbox::stripTags($job->fields['content']),
+ $job->fields['content'],
1,
);
diff --git a/inc/problemtask.class.php b/inc/problemtask.class.php
index 0d19cc8..f89d506 100755
--- a/inc/problemtask.class.php
+++ b/inc/problemtask.class.php
@@ -124,7 +124,7 @@ public static function pdfForProblem(PluginPdfSimplePDF $pdf, Problem $job)
);
$pdf->displayText(
'' . sprintf(__s('%1$s: %2$s') . '', __s('Description'), ''),
- Toolbox::stripTags($data['content']),
+ $data['content'],
1,
);
}
From 5d00f0d46b1c53ee2b8f21d6cdbe6a23166e4bb7 Mon Sep 17 00:00:00 2001
From: Rom1-B <8530352+Rom1-B@users.noreply.github.com>
Date: Mon, 27 Jul 2026 10:16:23 +0200
Subject: [PATCH 2/2] lint
---
inc/common.class.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/inc/common.class.php b/inc/common.class.php
index a883614..403da09 100644
--- a/inc/common.class.php
+++ b/inc/common.class.php
@@ -59,6 +59,8 @@ public function addStandardTab($itemtype, array &$ong, array $options)
$withtemplate = $options['withtemplate'];
}
+ // $itemtype has no native type hint; PHPDoc-inferred class-string type isn't enforced at runtime
+ /** @phpstan-ignore-next-line function.impossibleType */
if (!is_numeric($itemtype) && ($obj = $dbu->getItemForItemtype($itemtype)) && (method_exists($itemtype, 'displayTabContentForPDF'))) {
$titles = $obj->getTabNameForItem($this->obj, $withtemplate);
if (!is_array($titles)) {