Skip to content
Permalink
Browse files

[FIXED JENKINS-16561]

eval("") is no-op in IE but window.execScript("") isn't.
So bring the uniformity outside
  • Loading branch information...
kohsuke committed Feb 13, 2013
1 parent b5ed319 commit 3f48eff1ee39e772bd0c1c097ff99fb62786e69f
Showing with 8 additions and 4 deletions.
  1. +3 −0 changelog.html
  2. +5 −4 war/src/main/webapp/scripts/hudson-behavior.js
@@ -55,6 +55,9 @@
<!-- 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);
}
}
}
});
}

0 comments on commit 3f48eff

Please sign in to comment.
You can’t perform that action at this time.