Skip to content

Commit 6509eae

Browse files
author
Hwashiang Yu
committed
MAGETWO-98351: Update transaction email variable dialog
- Updated variable dialog values
1 parent 0965809 commit 6509eae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Variable/view/adminhtml/web/variables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ window.Variables = {
3737
this.variablesContent = '<ul class="insert-variable">';
3838
variables.each(function(variableGroup) {
3939
if (variableGroup.label && variableGroup.value) {
40-
this.variablesContent += '<li><b>' + variableGroup.label + '</b></li>';
40+
this.variablesContent += '<li><b>' + variableGroup.label.escapeHTML() + '</b></li>';
4141
(variableGroup.value).each(function(variable){
4242
if (variable.value && variable.label) {
4343
this.variablesContent += '<li>' +
@@ -72,7 +72,7 @@ window.Variables = {
7272
},
7373
prepareVariableRow: function(varValue, varLabel) {
7474
var value = (varValue).replace(/"/g, '&quot;').replace(/'/g, '\\&#39;');
75-
var content = '<a href="#" onclick="'+this.insertFunction+'(\''+ value +'\');return false;">' + varLabel + '</a>';
75+
var content = '<a href="#" onclick="'+this.insertFunction+'(\''+ value.escapeHTML() +'\');return false;">' + varLabel.escapeHTML() + '</a>';
7676
return content;
7777
},
7878
insertVariable: function(value) {

0 commit comments

Comments
 (0)