mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(manufacturing): escape node values in BOM configurator tree
This commit is contained in:
@@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user