diff --git a/inc/itilsolution.class.php b/inc/itilsolution.class.php
index c4b3fc9..d79f8f6 100644
--- a/inc/itilsolution.class.php
+++ b/inc/itilsolution.class.php
@@ -70,11 +70,18 @@ public static function pdfForItem(PluginPdfSimplePDF $pdf, CommonDBTM $item)
} else {
$title = __('Solution');
}
- $sol = Toolbox::stripTags(Glpi\Toolbox\Sanitizer::unsanitize(html_entity_decode(
- $row['content'],
- ENT_QUOTES,
- 'UTF-8',
- )));
+ $sol = Glpi\Toolbox\Sanitizer::unsanitize(Html::entity_decode_deep($row['content']));
+ $sol = preg_replace('#data:image/[^;]+;base64,#', '@', $sol);
+
+ preg_match_all('/
]*src=[\'"]([^\'"]*docid=([0-9]*))[^>]*>/', $sol, $res, PREG_SET_ORDER);
+
+ foreach ($res as $img) {
+ $docimg = new Document();
+ $docimg->getFromDB($img[2]);
+
+ $path = '
';
+ $sol = str_replace($img[0], $path, $sol);
+ }
if ($row['status'] == 3) {
$text = __('Soluce approved on ', 'pdf');