HTML escape the label, when setting the collection node count along

with the label of the tree-nodes.
This commit is contained in:
Andrei Antonov 2017-05-10 13:25:49 +05:30 committed by Ashesh Vashi
parent 29217946c3
commit cbf2de6c27

View File

@ -743,7 +743,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
t.setLabel(
pItem, {
label: (
pData._label + ' <span>(' + pData.collection_count + ')</span>'
_.escape(pData._label) + ' <span>(' + pData.collection_count + ')</span>'
)
}
);
@ -821,7 +821,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
t.setLabel(
pItem, {
label: (
pData._label + ' <span>(' + pData.collection_count + ')</span>'
_.escape(pData._label) + ' <span>(' + pData.collection_count + ')</span>'
)
}
);
@ -838,7 +838,7 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
if (self.is_collection && 'collection_count' in data)
{
delete data.collection_count;
t.setLabel(item, {label: data._label});
t.setLabel(item, {label: _.escape(data._label)});
}
},
refresh: function(cmd, i) {