Fix plugin admin links not working, protect against potential apostrophes in plugin name
Ryan Blenis committed
Dec 3, 2019 at 20:50 UTC
3ae2951e30130ed840b60c701e2c772db6918e74
1 file changed
+1
-1
views/default.handlebars
+1
-1
@@ -9539,7 +9539,7 @@
9539
installedPluginList.forEach(function(p){
9540
var cant_action = [];
9541
if (p.hasAdminPanel == true && p.status) {
9542
- p.nameHtml = '<a onclick="return goPlugin(' + p.shortName + ', ' + p.name + ');">' + p.name + '</a>';
9542
+ p.nameHtml = '<a onclick="return goPlugin(\'' + p.shortName + '\', \'' + p.name.replace(/'/g, "\\'") + '\');">' + p.name + '</a>';
9543
} else {
9544
p.nameHtml = p.name;
9545
}