[Fix] Special character issue (#13350)
diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js
index 2748436..dff65af 100644
--- a/erpnext/stock/dashboard/item_dashboard.js
+++ b/erpnext/stock/dashboard/item_dashboard.js
@@ -18,12 +18,12 @@
// move
this.content.on('click', '.btn-move', function() {
- erpnext.stock.move_item($(this).attr('data-item'), $(this).attr('data-warehouse'),
+ erpnext.stock.move_item(unescape($(this).attr('data-item')), $(this).attr('data-warehouse'),
null, $(this).attr('data-actual_qty'), null, function() { me.refresh(); });
});
this.content.on('click', '.btn-add', function() {
- erpnext.stock.move_item($(this).attr('data-item'), null, $(this).attr('data-warehouse'),
+ erpnext.stock.move_item(unescape($(this).attr('data-item')), null, $(this).attr('data-warehouse'),
$(this).attr('data-actual_qty'), $(this).attr('data-rate'),
function() { me.refresh(); });
});
diff --git a/erpnext/stock/dashboard/item_dashboard_list.html b/erpnext/stock/dashboard/item_dashboard_list.html
index e0b3431..5a3fa2e 100644
--- a/erpnext/stock/dashboard/item_dashboard_list.html
+++ b/erpnext/stock/dashboard/item_dashboard_list.html
@@ -45,12 +45,12 @@
<button class="btn btn-default btn-xs btn-move"
data-warehouse="{{ d.warehouse }}"
data-actual_qty="{{ d.actual_qty }}"
- data-item="{{ d.item_code }}">{{ __("Move") }}</a>
+ data-item="{{ escape(d.item_code) }}">{{ __("Move") }}</a>
{% endif %}
<button style="margin-left: 7px;" class="btn btn-default btn-xs btn-add"
data-warehouse="{{ d.warehouse }}"
data-actual_qty="{{ d.actual_qty }}"
- data-item="{{ d.item_code }}"
+ data-item="{{ escape(d.item_code) }}"
data-rate="{{ d.valuation_rate }}">{{ __("Add") }}</a>
</div>
{% endif %}