You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-04-24 09:10:20

vaibhav12321
Member
Registered: 2018-07-25
Posts: 2

Problem with Parse E-Mail content for ticket generation

Hi,

Currently using glpi 9.2 and getting an problem with parsing email content while ticket generate.

I debug and found the problem with the below code, While we have image in mail body so that time it remove some content of mail.

File : ticket.class.php
Function : convertContentForTicket
Code :
preg_match_all("/src\s*=\s*['|\"](.+?)['|\"]/", $html, $matches, PREG_PATTERN_ORDER);
if (isset($matches[1]) && count($matches[1])) {
// Get all image src

foreach ($matches[1] as $src) {
// Set tag if image matches
foreach ($files as $data => $filename) {
if (preg_match("/".$data."/i", $src)) {
$html = preg_replace("`<img.*src=['|\"]".$src."['|\"][^>]*\>`", "<p>".Document::getImageTag($tags[$filename])."</p>", $html);
}
}
}
}

Thanks,
Vaibhav

Offline

Board footer

Powered by FluxBB