Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This needs to be eval, not geval.
Plus I forgot to return the value.
  • Loading branch information
kohsuke committed Oct 25, 2012
1 parent 51f508b commit 5aca73f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions war/src/main/webapp/scripts/hudson-behavior.js
Expand Up @@ -369,7 +369,7 @@ function parseHtml(html) {
*/
function geval(script) {
// see http://perfectionkills.com/global-eval-what-are-the-options/
(this.execScript || eval)(script);
return (this.execScript || eval)(script);
}

/**
Expand Down Expand Up @@ -404,7 +404,7 @@ var tooltip;
function registerValidator(e) {
e.targetElement = findFollowingTR(e, "validation-error-area").firstChild.nextSibling;
e.targetUrl = function() {
return geval(this.getAttribute("checkUrl"));
return eval(this.getAttribute("checkUrl")); // need access to 'this'
};
var method = e.getAttribute("checkMethod");
if (!method) method = "get";
Expand Down

0 comments on commit 5aca73f

Please sign in to comment.