From f970a9fd613b96a8b655c1de281640136792ed39 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 10 Jan 2019 15:34:39 +0530 Subject: [PATCH] fix(comments mention): Fix ascii issue in comments mention (#6742) --- frappe/core/doctype/communication/comment.py | 6 ++++-- frappe/templates/emails/mentioned_in_comment.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frappe/core/doctype/communication/comment.py b/frappe/core/doctype/communication/comment.py index 0ceb93219c..fa3a7b2dcc 100644 --- a/frappe/core/doctype/communication/comment.py +++ b/frappe/core/doctype/communication/comment.py @@ -96,15 +96,17 @@ def notify_mentions(doc): recipients = [frappe.db.get_value("User", {"enabled": 1, "name": name, "user_type": "System User"}, "email") for name in mentions] + link = get_link_to_form(doc.reference_doctype, doc.reference_name, label=parent_doc_label) + frappe.sendmail( recipients=recipients, sender=frappe.session.user, subject=subject, template="mentioned_in_comment", args={ - "sender_fullname": sender_fullname, + "body_content": _("{0} mentioned you in a comment in {1}").format(sender_fullname, link), "comment": doc, - "link": get_link_to_form(doc.reference_doctype, doc.reference_name, label=parent_doc_label) + "link": link }, header=[_('New Mention'), 'orange'] ) diff --git a/frappe/templates/emails/mentioned_in_comment.html b/frappe/templates/emails/mentioned_in_comment.html index becf1dfd25..92bf15723a 100644 --- a/frappe/templates/emails/mentioned_in_comment.html +++ b/frappe/templates/emails/mentioned_in_comment.html @@ -1,5 +1,5 @@

- {{ _("{0} mentioned you in a comment in {1}").format(sender_fullname, link) }} + {{ body_content }}