diff --git a/erpnext/manufacturing/doctype/plant_floor/stock_summary_template.html b/erpnext/manufacturing/doctype/plant_floor/stock_summary_template.html index 69c8f44f4e7..d5f252c42c3 100644 --- a/erpnext/manufacturing/doctype/plant_floor/stock_summary_template.html +++ b/erpnext/manufacturing/doctype/plant_floor/stock_summary_template.html @@ -2,9 +2,9 @@
{% if(row.image) { %} - + {% } else { %} -
{{frappe.get_abbr(row.item_code, 2)}}
+
{{frappe.get_abbr(frappe.utils.escape_html(row.item_code), 2)}}
{% } %}
@@ -13,7 +13,7 @@ {% } else { %} {{row.item_link}}

- {{row.item_name}} + {{frappe.utils.escape_html(row.item_name)}}

{% } %} @@ -52,10 +52,10 @@
- +
- +
{% }); %} diff --git a/erpnext/manufacturing/doctype/workstation/workstation.py b/erpnext/manufacturing/doctype/workstation/workstation.py index 1e65ea7bedf..d996d8a98ea 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.py +++ b/erpnext/manufacturing/doctype/workstation/workstation.py @@ -418,6 +418,6 @@ def get_workstations(**kwargs): d.background_color = color_map.get(d.status, "var(--red-600)") d.workstation_link = get_url_to_form("Workstation", d.name) if d.status != "Production": - d.status_image = d.off_status_image + d.status_image = frappe.utils.escape_html(d.off_status_image) return data diff --git a/erpnext/public/js/templates/item_selector.html b/erpnext/public/js/templates/item_selector.html index 86a15f49072..0839077f57d 100644 --- a/erpnext/public/js/templates/item_selector.html +++ b/erpnext/public/js/templates/item_selector.html @@ -1,17 +1,19 @@
{% for (var i=0; i < data.length; i++) { var item = data[i]; %} + {% const item_name = frappe.utils.escape_html(item.name); %} + {% const item_title = frappe.utils.escape_html(item.item_name || item.name); %} {% if (i % 4 === 0) { %}
{% } %} -
+
-
- {%= frappe.get_abbr(item.item_name || item.name) %} + {%= frappe.get_abbr(item_title) %} {% } %} {% if (item.image) { %} - {{item.item_name || item.name}} + {{ item_title }} {% } %}
diff --git a/erpnext/public/js/templates/visual_plant_floor_template.html b/erpnext/public/js/templates/visual_plant_floor_template.html index a1639f07370..a60007a04d5 100644 --- a/erpnext/public/js/templates/visual_plant_floor_template.html +++ b/erpnext/public/js/templates/visual_plant_floor_template.html @@ -1,4 +1,5 @@ {% $.each(workstations, (idx, row) => { %} + {% const row_workstation_name = frappe.utils.escape_html(row.name); %}
{% if(row.status == "Production") { %} @@ -17,14 +18,14 @@ {% if(row.status_image) { %} {% } else { %} -
{{frappe.get_abbr(row.name, 2)}}
+
{{frappe.get_abbr(row_workstation_name, 2)}}
{% } %}
- - {{row.workstation_name}} + + {{row_workstation_name}}