Skip to content

Commit cdfed07

Browse files
authored
Fix: restore image rendering in change/problem/task PDF descriptions (#74)
* Fix: restore image rendering in change/problem/task PDF descriptions * lint
1 parent f3d9c2c commit cdfed07

5 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
- Fix image rendering in Change/Problem descriptions and Problem task PDF exports
13+
814
## [4.1.3] - 2026-06-24
915

1016
### Fixed

‎inc/change.class.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public static function pdfMain(PluginPdfSimplePDF $pdf, Change $job)
298298

299299
$pdf->displayText(
300300
'<b><i>' . sprintf(__s('%1$s: %2$s') . '</i></b>', __s('Description'), ''),
301-
Toolbox::stripTags($job->fields['content']),
301+
$job->fields['content'],
302302
1,
303303
);
304304

‎inc/common.class.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ public function addStandardTab($itemtype, array &$ong, array $options)
5959
$withtemplate = $options['withtemplate'];
6060
}
6161

62+
// $itemtype has no native type hint; PHPDoc-inferred class-string type isn't enforced at runtime
63+
/** @phpstan-ignore-next-line function.impossibleType */
6264
if (!is_numeric($itemtype) && ($obj = $dbu->getItemForItemtype($itemtype)) && (method_exists($itemtype, 'displayTabContentForPDF'))) {
6365
$titles = $obj->getTabNameForItem($this->obj, $withtemplate);
6466
if (!is_array($titles)) {

‎inc/problem.class.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public static function pdfMain(PluginPdfSimplePDF $pdf, Problem $job)
298298

299299
$pdf->displayText(
300300
'<b><i>' . sprintf(__s('%1$s: %2$s'), __s('Description') . '</i></b>', ''),
301-
Toolbox::stripTags($job->fields['content']),
301+
$job->fields['content'],
302302
1,
303303
);
304304

‎inc/problemtask.class.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static function pdfForProblem(PluginPdfSimplePDF $pdf, Problem $job)
124124
);
125125
$pdf->displayText(
126126
'<b><i>' . sprintf(__s('%1$s: %2$s') . '</i></b>', __s('Description'), ''),
127-
Toolbox::stripTags($data['content']),
127+
$data['content'],
128128
1,
129129
);
130130
}

0 commit comments

Comments
 (0)