diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html
index e671e91db2f..10466a6cb2f 100644
--- a/erpnext/templates/pages/projects.html
+++ b/erpnext/templates/pages/projects.html
@@ -34,7 +34,7 @@
{% if doc.tasks %}
diff --git a/erpnext/templates/pages/projects.js b/erpnext/templates/pages/projects.js
index 622ed42f85f..24c16268e61 100644
--- a/erpnext/templates/pages/projects.js
+++ b/erpnext/templates/pages/projects.js
@@ -45,7 +45,7 @@ frappe.ready(function () {
dataType: "json",
data: {
cmd: "erpnext.templates.pages.projects.get_" + item + "_html",
- project: "{{ doc.name }}",
+ project: "{{ doc.name | e }}",
item_status: item_status,
},
success: function (data) {
@@ -80,7 +80,7 @@ frappe.ready(function () {
dataType: "json",
data: {
cmd: "erpnext.templates.pages.projects.get_" + item + "_html",
- project: "{{ doc.name }}",
+ project: "{{ doc.name | e }}",
start: start,
item_status: item_status,
},
@@ -96,7 +96,7 @@ frappe.ready(function () {
var close_item = function (item, item_name) {
var args = {
- project: "{{ doc.name }}",
+ project: "{{ doc.name | e }}",
item_name: item_name,
};
frappe.call({