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 {
|
||||
var agentsFiltered = agentsFilteredWithAgents(agents, ids);
|
||||
var modules = moduleNamesFromAgents(agentsFiltered);
|
||||
|
||||
for (var i = 0; i < modules.length; i++) {
|
||||
modules[i] = htmlDecode(modules[i]);
|
||||
}
|
||||
|
||||
fillModules(modules, modulesSelected);
|
||||
}
|
||||
|
|
|
@ -1184,3 +1184,13 @@ var autoHideElement = function (element, hideTime) {
|
|||
// Start hide
|
||||
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