Merge pull request #1110 from lv7777/fix-#394

fix #394. - use "new Function" instead of "eval" for safety (?)
This commit is contained in:
YUKI "Piro" Hiroshi 2016-04-30 11:46:24 +09:00
commit 7ba39cb03b

View File

@ -980,7 +980,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let insertAfter = item.getAttribute('multipletab-insertafter');
if (insertAfter) {
try {
eval('refNode = ('+insertAfter+').nextSibling');
(new Function('return refNode = ('+insertAfter+').nextSibling'))();
}
catch(e) {
}
@ -988,7 +988,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let insertBefore = item.getAttribute('multipletab-insertbefore');
if (refNode === void(0) && insertBefore) {
try {
eval('refNode = '+insertBefore);
(new Function('return refNode = '+insertBefore))();
}
catch(e) {
}