提交 3f48eff1 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-16561]

eval("") is no-op in IE but window.execScript("") isn't.
So bring the uniformity outside
上级 b5ed3199
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Script evaluation script error on IE.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16561">issue 16561</a>)
<li class=bug>
surefire-reports not detected for android-maven-plugin
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-16776">issue 16776</a>)
......
......@@ -368,6 +368,8 @@ function parseHtml(html) {
* Evaluates the script in global context.
*/
function geval(script) {
// execScript chokes on "" but eval doesn't, so we need to reject it first.
if (script==null || script=="") return;
// see http://perfectionkills.com/global-eval-what-are-the-options/
// note that execScript cannot return value
(this.execScript || eval)(script);
......@@ -2143,12 +2145,11 @@ function validateButton(checkUrl,paramList,button) {
Behaviour.applySubtree(target);
layoutUpdateCallback.call();
var s = rsp.getResponseHeader("script");
if(s!=null)
try {
try {
geval(s);
} catch(e) {
} catch(e) {
window.alert("failed to evaluate "+s+"\n"+e.message);
}
}
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册