Fix dashlet sanitization

This commit is contained in:
Stephen Abello
2021-02-17 16:41:49 +01:00
parent acf721befa
commit b7c7b05243
2 changed files with 4 additions and 4 deletions

View File

@@ -55,8 +55,8 @@ if (typeof(charts) === "undefined")
}
var idxChart=charts.length;
charts.push(chart);
var refreshChart{{ oUIBlock.sId|variable_name }} = '$.post("{{ oUIBlock.sURLForRefresh|raw }}&refresh='+idxChart+'","", function (data) {'+
var refreshChart{{ oUIBlock.sId|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }} = '$.post("{{ oUIBlock.sURLForRefresh|raw }}&refresh='+idxChart+'","", function (data) {'+
'charts['+idxChart+'].unload();'+
'setTimeout(function () {eval(data.js);},50);'+
'})';
refreshChart.push(refreshChart{{ oUIBlock.sId|variable_name }});
refreshChart.push(refreshChart{{ oUIBlock.sId|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }});

View File

@@ -31,9 +31,9 @@ if (typeof(charts) === "undefined")
}
var idxChart=charts.length;
charts.push(chart);
var refreshChart{{ oUIBlock.sId|variable_name }}=' $.post("{{ oUIBlock.sURLForRefresh|raw }}&refresh='+idxChart+'","", function (data) {'+
var refreshChart{{ oUIBlock.sId|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }}=' $.post("{{ oUIBlock.sURLForRefresh|raw }}&refresh='+idxChart+'","", function (data) {'+
'charts['+idxChart+'].unload();'+
'setTimeout(function () {eval(data.js);},50);'+
'});';
refreshChart.push(refreshChart{{ oUIBlock.sId|variable_name }});
refreshChart.push(refreshChart{{ oUIBlock.sId|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_VARIABLE_NAME')) }});