mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 07:58:38 +00:00
fix(workstation): escape data on get_workstations
This commit is contained in:
@@ -457,7 +457,7 @@ def get_workstations(**kwargs):
|
||||
d.color = color_map.get(d.status, "red")
|
||||
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)
|
||||
d.workstation_off = "workstation-off"
|
||||
|
||||
return data
|
||||
|
||||
@@ -176,7 +176,7 @@ class VisualPlantFloor {
|
||||
.find(".workstation-image-container")
|
||||
.append(
|
||||
`<div class="workstation-image-cls workstation-abbr" style="margin:6px; height:82px">${frappe.get_abbr(
|
||||
data.name,
|
||||
frappe.utils.escape_html(data.name),
|
||||
2
|
||||
)}</div>`
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% $.each(workstations, (idx, row) => { %}
|
||||
<div class="workstation-wrapper" data-workstation="{{row.name}}">
|
||||
{% const row_workstation_name = frappe.utils.escape_html(row.name); %}
|
||||
<div class="workstation-wrapper" data-workstation="{{row_workstation_name}}">
|
||||
<div class="workstation-status text-left" style="">
|
||||
<span class="indicator-pill no-indicator-dot whitespace-nowrap {{row.color}}" style="margin: 8px 0px 0px 8px;">
|
||||
<span class="workstation-status-title" style="font-size:10px">{{row.status}}</span>
|
||||
@@ -10,12 +11,12 @@
|
||||
{% if(row.status_image) { %}
|
||||
<img class="workstation-image-cls" src="{{row.status_image}}">
|
||||
{% } else { %}
|
||||
<div class="workstation-image-cls workstation-abbr" style="margin:6px; height:82px">{{frappe.get_abbr(row.name, 2)}}</div>
|
||||
<div class="workstation-image-cls workstation-abbr" style="margin:6px; height:82px">{{frappe.get_abbr(row_workstation_name, 2)}}</div>
|
||||
{% } %}
|
||||
</div>
|
||||
<span class="ellipsis" title="{{row.name}}">
|
||||
<span class="ellipsis" title="{{row_workstation_name}}">
|
||||
<div style="font-size:11px; text-align:center;padding-bottom:8px">{{row.workstation_name}}</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% }); %}
|
||||
{% }); %}
|
||||
|
||||
Reference in New Issue
Block a user