Skip to content

Commit

Permalink
Do not strip HTML tags in plain text emails - closes #3614
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Dec 16, 2023
1 parent ef0af3a commit 1578046
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Console/Commands/FetchEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,15 @@ public function processMessage($message, $message_id, $mailbox, $mailboxes, $ext
// Get body and do not replace :cid with images base64
$html_body = $message->getHTMLBody(false);
}

$is_html = true;

if ($html_body) {
$body = $html_body;
} else {
$is_html = false;
$body = $message->getTextBody();
$body = $message->getTextBody() ?? '';
$body = htmlspecialchars($body);
}
$body = $this->separateReply($body, $is_html, $is_reply, !$message_from_customer);

Expand Down

0 comments on commit 1578046

Please sign in to comment.