Merge pull request #1110 from lv7777/fix-#394
fix #394. - use "new Function" instead of "eval" for safety (?)
This commit is contained in:
commit
7ba39cb03b
@ -980,7 +980,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
|||||||
let insertAfter = item.getAttribute('multipletab-insertafter');
|
let insertAfter = item.getAttribute('multipletab-insertafter');
|
||||||
if (insertAfter) {
|
if (insertAfter) {
|
||||||
try {
|
try {
|
||||||
eval('refNode = ('+insertAfter+').nextSibling');
|
(new Function('return refNode = ('+insertAfter+').nextSibling'))();
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
}
|
}
|
||||||
@ -988,7 +988,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
|
|||||||
let insertBefore = item.getAttribute('multipletab-insertbefore');
|
let insertBefore = item.getAttribute('multipletab-insertbefore');
|
||||||
if (refNode === void(0) && insertBefore) {
|
if (refNode === void(0) && insertBefore) {
|
||||||
try {
|
try {
|
||||||
eval('refNode = '+insertBefore);
|
(new Function('return refNode = '+insertBefore))();
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user