File tree Expand file tree Collapse file tree
javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ function basicExceptions() {
313313}
314314
315315function handlebarsSafeString ( ) {
316- return new Handlebars . SafeString ( location ) ; // NOT OK!
316+ return new Handlebars . SafeString ( location ) ; // NOT OK!
317317}
318318
319319function 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() {
380380function 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
You can’t perform that action at this time.
0 commit comments