diff --git a/inc/itilsolution.class.php b/inc/itilsolution.class.php
index b514eaf..94fc247 100644
--- a/inc/itilsolution.class.php
+++ b/inc/itilsolution.class.php
@@ -67,8 +67,18 @@ 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');