Decode html entities in module plugin selector for edit bulk operation - #959
This commit is contained in:
parent
291ae3a192
commit
ced8050317
|
@ -911,6 +911,10 @@ echo '</form>';
|
||||||
try {
|
try {
|
||||||
var agentsFiltered = agentsFilteredWithAgents(agents, ids);
|
var agentsFiltered = agentsFilteredWithAgents(agents, ids);
|
||||||
var modules = moduleNamesFromAgents(agentsFiltered);
|
var modules = moduleNamesFromAgents(agentsFiltered);
|
||||||
|
|
||||||
|
for (var i = 0; i < modules.length; i++) {
|
||||||
|
modules[i] = htmlDecode(modules[i]);
|
||||||
|
}
|
||||||
|
|
||||||
fillModules(modules, modulesSelected);
|
fillModules(modules, modulesSelected);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1184,3 +1184,13 @@ var autoHideElement = function (element, hideTime) {
|
||||||
// Start hide
|
// Start hide
|
||||||
startHideTimeout(hideTime);
|
startHideTimeout(hideTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function htmlEncode(value){
|
||||||
|
// Create a in-memory div, set its inner text (which jQuery automatically encodes)
|
||||||
|
// Then grab the encoded contents back out. The div never exists on the page.
|
||||||
|
return $('<div/>').text(value).html();
|
||||||
|
}
|
||||||
|
|
||||||
|
function htmlDecode(value){
|
||||||
|
return $('<div/>').html(value).text();
|
||||||
|
}
|
Loading…
Reference in New Issue