Skip to content

Commit b0d4b31

Browse files
committed
JS: Trim whitespace in test
1 parent c7f16cd commit b0d4b31

File tree

1 file changed

+6
-6
lines changed
  • javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss

1 file changed

+6
-6
lines changed

javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/tst.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function basicExceptions() {
313313
}
314314

315315
function handlebarsSafeString() {
316-
return new Handlebars.SafeString(location); // NOT OK!
316+
return new Handlebars.SafeString(location); // NOT OK!
317317
}
318318

319319
function test2() {
@@ -355,15 +355,15 @@ function thisNodes() {
355355
var target = document.location.search
356356
this.html(target); // NOT OK. (this is a jQuery object)
357357
this.innerHTML = target // OK. (this is a jQuery object)
358-
358+
359359
this.each(function (i, e) {
360360
this.innerHTML = target; // NOT OK. (this is a DOM-node);
361361
this.html(target); // OK. (this is a DOM-node);
362-
362+
363363
e.innerHTML = target; // NOT OK.
364364
});
365365
}
366-
$.fn[pluginName] = myPlugin;
366+
$.fn[pluginName] = myPlugin;
367367

368368
}
369369

@@ -380,7 +380,7 @@ function test() {
380380
function test() {
381381
var target = document.location.search
382382

383-
383+
384384
$('myId').html(target); // NOT OK
385385

386386
$('myId').html(target.taint); // NOT OK
@@ -401,7 +401,7 @@ function test() {
401401
if (random()) {return;}
402402
$('myId').html(target.taint6); // OK
403403

404-
404+
405405
if (random()) {target.taint7 = "safe";}
406406
$('myId').html(target.taint7); // NOT OK
407407

0 commit comments

Comments
 (0)