diff --git a/inc/tickettask.class.php b/inc/tickettask.class.php
index 30bea08..82b4693 100644
--- a/inc/tickettask.class.php
+++ b/inc/tickettask.class.php
@@ -145,9 +145,22 @@ public static function pdfForTicket(PluginPdfSimplePDF $pdf, Ticket $job, $priva
Toolbox::stripTags($dbu->getUserName($data['users_id'])),
$planification,
);
+ $content = Glpi\Toolbox\Sanitizer::unsanitize(Html::entity_decode_deep($data['content']));
+ $content = preg_replace('#data:image/[^;]+;base64,#', '@', $content);
+
+ preg_match_all('/
]*src=[\'"]([^\'"]*docid=([0-9]*))[^>]*>/', $content, $res, PREG_SET_ORDER);
+
+ foreach ($res as $img) {
+ $docimg = new Document();
+ $docimg->getFromDB($img[2]);
+
+ $path = '
';
+ $content = str_replace($img[0], $path, $content);
+ }
+
$pdf->displayText(
- '' . sprintf(__('%1$s: %2$s') . '', __('Description'), ''),
- '
' . $data['content'],
+ "" . sprintf(__('%1$s: %2$s') . "", __('Description'), ''),
+ $content,
1,
);
}