mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
JS: Trim whitespace in test
This commit is contained in:
@@ -313,7 +313,7 @@ function basicExceptions() {
|
||||
}
|
||||
|
||||
function handlebarsSafeString() {
|
||||
return new Handlebars.SafeString(location); // NOT OK!
|
||||
return new Handlebars.SafeString(location); // NOT OK!
|
||||
}
|
||||
|
||||
function test2() {
|
||||
@@ -355,15 +355,15 @@ function thisNodes() {
|
||||
var target = document.location.search
|
||||
this.html(target); // NOT OK. (this is a jQuery object)
|
||||
this.innerHTML = target // OK. (this is a jQuery object)
|
||||
|
||||
|
||||
this.each(function (i, e) {
|
||||
this.innerHTML = target; // NOT OK. (this is a DOM-node);
|
||||
this.html(target); // OK. (this is a DOM-node);
|
||||
|
||||
|
||||
e.innerHTML = target; // NOT OK.
|
||||
});
|
||||
}
|
||||
$.fn[pluginName] = myPlugin;
|
||||
$.fn[pluginName] = myPlugin;
|
||||
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ function test() {
|
||||
function test() {
|
||||
var target = document.location.search
|
||||
|
||||
|
||||
|
||||
$('myId').html(target); // NOT OK
|
||||
|
||||
$('myId').html(target.taint); // NOT OK
|
||||
@@ -401,7 +401,7 @@ function test() {
|
||||
if (random()) {return;}
|
||||
$('myId').html(target.taint6); // OK
|
||||
|
||||
|
||||
|
||||
if (random()) {target.taint7 = "safe";}
|
||||
$('myId').html(target.taint7); // NOT OK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user