fix(manufacturing): escape node values in BOM configurator tree

This commit is contained in:
Mihir Kandoi
2026-10-23 06:29:06 +00:00
parent 3ff83243a7
commit 18e4302b33
@@ -79,8 +79,8 @@ class BOMConfigurator {
},
onrender(node) {
const qty = node.data.qty || frm_obj.frm.doc.qty;
const uom = node.data.uom || frm_obj.frm.doc.uom;
const docname = node.data.name || frm_obj.frm.doc.name;
const uom = frappe.utils.escape_html(node.data.uom || frm_obj.frm.doc.uom);
const docname = frappe.utils.escape_html(node.data.name || frm_obj.frm.doc.name);
let amount = node.data.amount;
if (node.data.value === frm_obj.frm.doc.item_code) {
amount = frm_obj.frm.doc.raw_material_cost;
@@ -408,8 +408,8 @@ class BOMConfigurator {
node.data.qty = data.qty;
let uom = node.data.uom || this.frm.doc.uom;
$(node.parent.get(0))
.find(`[data-bom-qty-docname='${docname}']`)
.html(data.qty + " " + uom);
.find(`[data-bom-qty-docname="${CSS.escape(docname)}"]`)
.text(data.qty + " " + uom);
view.events.load_tree(r, node);
},
});