Skip to content

Commit

Permalink
Fix : Do not convert content from mail collector for a followup
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmr committed May 19, 2015
1 parent a1584a5 commit d4c941d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inc/mailcollector.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -750,15 +750,16 @@ function buildTicket($i, $options=array()) {
//If files are present and content is html
if (isset($this->files)
&& count($this->files)
&& ($tkt['content'] != strip_tags($tkt['content']))) {
&& ($tkt['content'] != strip_tags($tkt['content']))
&& !isset($tkt['tickets_id'])) {
$is_html = true;
$tkt['content'] = Ticket::convertContentForTicket($tkt['content'],
array_merge($this->files, $this->altfiles),
$this->tags);
}
$tkt['content'] = $this->cleanMailContent($tkt['content']);

if ($is_html) {
if ($is_html && !isset($tkt['tickets_id'])) {
$tkt['content'] = nl2br($tkt['content']);
}

Expand Down Expand Up @@ -926,6 +927,8 @@ function cleanMailContent($string) {

$rand = mt_rand();
// Move line breaks to special CHARS
$string = str_replace(array("<br>"),"==$rand==", $string);

$string = str_replace(array("\r\n", "\n", "\r"),"==$rand==", $string);

// Wrap content for blacklisted items
Expand Down

0 comments on commit d4c941d

Please sign in to comment.