diff --git a/erpnext/templates/pages/task_info.html b/erpnext/templates/pages/task_info.html
index fe4d304a398..4a98b425e73 100644
--- a/erpnext/templates/pages/task_info.html
+++ b/erpnext/templates/pages/task_info.html
@@ -1,11 +1,11 @@
{% extends "templates/web.html" %}
-{% block title %} {{ doc.name }} {% endblock %}
+{% block title %} {{ doc.name|e }} {% endblock %}
{% block breadcrumbs %}
-
+
@@ -13,16 +13,7 @@
{% block page_content %}
-
{{ doc.subject }}
-
-
-
-
+
{{ doc.subject|e }}
@@ -31,50 +22,44 @@
-
+
-
{% endblock %}
diff --git a/erpnext/templates/pages/task_info.py b/erpnext/templates/pages/task_info.py
index 66b775a9178..59fdee617ee 100644
--- a/erpnext/templates/pages/task_info.py
+++ b/erpnext/templates/pages/task_info.py
@@ -5,11 +5,12 @@ def get_context(context):
context.no_cache = 1
task = frappe.get_doc("Task", frappe.form_dict.task)
+ task.check_permission()
context.comments = frappe.get_all(
- "Communication",
- filters={"reference_name": task.name, "comment_type": "comment"},
- fields=["subject", "sender_full_name", "communication_date"],
+ "Comment",
+ filters={"reference_doctype": "Task", "reference_name": task.name, "comment_type": "Comment"},
+ fields=["content", "comment_email", "creation"],
)
context.doc = task
{{ __("Comments") }}
+{{ _("Comments") }}
{{comment.sender_full_name}}: - {{comment.subject}} {{ __("on") }} {{comment.creation.strftime('%Y-%m-%d')}}
+{{comment.comment_email}}: + {{comment.content|e}} {{ _("on") }} {{comment.creation.strftime('%Y-%m-%d')}}
{% endfor %}{{ __("Add Comment") }}
- -