Skip to content

Commit

Permalink
Merge PR #1490 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by hbrunn
  • Loading branch information
OCA-git-bot committed Dec 6, 2024
2 parents fb34dbb + 2a5372f commit 7286545
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mail_quoted_reply/models/mail_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, models
from odoo.tools import format_datetime
from odoo.tools import format_datetime, html_sanitize


class MailMessage(models.Model):
_inherit = "mail.message"

def _get_sanitized_body(self):
self.ensure_one()
return html_sanitize(self.body)

def _prep_quoted_reply_body(self):
return """
<div style="margin: 0px; padding: 0px;">
Expand All @@ -29,7 +33,7 @@ def _prep_quoted_reply_body(self):
email_from=self.email_from,
date=format_datetime(self.env, self.date),
subject=self.subject,
body=self.body,
body=self._get_sanitized_body(),
signature=self.env.user.signature,
str_date=_("Date"),
str_subject=_("Subject"),
Expand Down
1 change: 1 addition & 0 deletions mail_quoted_reply/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* Giuseppe Borruso <gborruso@dinamicheaziendali.it>
* Laurence Labusch <lala@labiso.de>
* Dani Forga
* Akim Juillerat <akim.juillerat@camptocamp.com>

0 comments on commit 7286545

Please sign in to comment.