@@ -11,8 +11,8 @@ var sanitize = require('.')
1111
1212/* eslint-disable no-script-url, max-params */
1313
14- test ( 'sanitize()' , function ( t ) {
15- t . test ( 'non-node' , function ( st ) {
14+ test ( 'sanitize()' , function ( t ) {
15+ t . test ( 'non-node' , function ( st ) {
1616 st . equal ( html ( sanitize ( true ) ) , '' , 'should ignore non-nodes (#1)' )
1717 st . equal ( html ( sanitize ( null ) ) , '' , 'should ignore non-nodes (#2)' )
1818 st . equal ( html ( sanitize ( 1 ) ) , '' , 'should ignore non-nodes (#3)' )
@@ -21,7 +21,7 @@ test('sanitize()', function(t) {
2121 st . end ( )
2222 } )
2323
24- t . test ( 'unknown nodes' , function ( st ) {
24+ t . test ( 'unknown nodes' , function ( st ) {
2525 st . equal (
2626 html ( sanitize ( u ( 'unknown' , '<xml></xml>' ) ) ) ,
2727 '' ,
@@ -31,7 +31,7 @@ test('sanitize()', function(t) {
3131 st . end ( )
3232 } )
3333
34- t . test ( 'ignored nodes' , function ( st ) {
34+ t . test ( 'ignored nodes' , function ( st ) {
3535 st . equal ( html ( sanitize ( u ( 'raw' , '<xml></xml>' ) ) ) , '' , 'should ignore `raw`' )
3636
3737 st . equal (
@@ -55,7 +55,7 @@ test('sanitize()', function(t) {
5555 st . end ( )
5656 } )
5757
58- t . test ( '`comment`' , function ( st ) {
58+ t . test ( '`comment`' , function ( st ) {
5959 st . equal (
6060 html ( sanitize ( u ( 'comment' , 'alpha' ) ) ) ,
6161 '' ,
@@ -87,7 +87,7 @@ test('sanitize()', function(t) {
8787 st . end ( )
8888 } )
8989
90- t . test ( '`doctype`' , function ( st ) {
90+ t . test ( '`doctype`' , function ( st ) {
9191 st . equal (
9292 html ( sanitize ( u ( 'doctype' , { name : 'html' } , 'alpha' ) ) ) ,
9393 '' ,
@@ -105,7 +105,7 @@ test('sanitize()', function(t) {
105105 st . end ( )
106106 } )
107107
108- t . test ( '`text`' , function ( st ) {
108+ t . test ( '`text`' , function ( st ) {
109109 st . deepEqual (
110110 sanitize ( {
111111 type : 'text' ,
@@ -159,7 +159,7 @@ test('sanitize()', function(t) {
159159 st . end ( )
160160 } )
161161
162- t . test ( '`element`' , function ( st ) {
162+ t . test ( '`element`' , function ( st ) {
163163 st . deepEqual (
164164 sanitize ( {
165165 type : 'element' ,
@@ -346,7 +346,7 @@ test('sanitize()', function(t) {
346346 'should ignore `svg` elements'
347347 )
348348
349- st . test ( 'href`' , function ( sst ) {
349+ st . test ( 'href`' , function ( sst ) {
350350 testAllURLs ( sst , 'a' , 'href' , {
351351 valid : {
352352 anchor : '#heading' ,
@@ -372,7 +372,7 @@ test('sanitize()', function(t) {
372372 sst . end ( )
373373 } )
374374
375- st . test ( '`cite`' , function ( sst ) {
375+ st . test ( '`cite`' , function ( sst ) {
376376 testAllURLs ( sst , 'blockquote' , 'cite' , {
377377 valid : {
378378 anchor : '#heading' ,
@@ -397,7 +397,7 @@ test('sanitize()', function(t) {
397397 sst . end ( )
398398 } )
399399
400- st . test ( '`src`' , function ( sst ) {
400+ st . test ( '`src`' , function ( sst ) {
401401 testAllURLs ( sst , 'img' , 'src' , {
402402 valid : {
403403 anchor : '#heading' ,
@@ -422,7 +422,7 @@ test('sanitize()', function(t) {
422422 sst . end ( )
423423 } )
424424
425- st . test ( '`longDesc`' , function ( sst ) {
425+ st . test ( '`longDesc`' , function ( sst ) {
426426 testAllURLs ( sst , 'img' , 'longDesc' , {
427427 valid : {
428428 anchor : '#heading' ,
@@ -447,7 +447,7 @@ test('sanitize()', function(t) {
447447 sst . end ( )
448448 } )
449449
450- st . test ( '`li`' , function ( sst ) {
450+ st . test ( '`li`' , function ( sst ) {
451451 sst . deepEqual (
452452 sanitize ( h ( 'li' , 'alert(1)' ) ) ,
453453 u ( 'text' , 'alert(1)' ) ,
@@ -480,8 +480,8 @@ test('sanitize()', function(t) {
480480
481481 sst . end ( )
482482 } )
483- ; [ 'tr' , 'td' , 'th' , 'tbody' , 'thead' , 'tfoot' ] . forEach ( function ( name ) {
484- st . test ( '`' + name + '`' , function ( sst ) {
483+ ; [ 'tr' , 'td' , 'th' , 'tbody' , 'thead' , 'tfoot' ] . forEach ( function ( name ) {
484+ st . test ( '`' + name + '`' , function ( sst ) {
485485 sst . deepEqual (
486486 sanitize ( h ( name , 'alert(1)' ) ) ,
487487 u ( 'text' , 'alert(1)' ) ,
@@ -611,7 +611,7 @@ test('sanitize()', function(t) {
611611 st . end ( )
612612 } )
613613
614- t . test ( '`root`' , function ( st ) {
614+ t . test ( '`root`' , function ( st ) {
615615 st . deepEqual (
616616 sanitize ( {
617617 type : 'root' ,
@@ -660,7 +660,7 @@ function testAllURLs(t, tagName, prop, all) {
660660
661661// Test `valid` `url`s in `prop` on `tagName`.
662662function testURLs ( t , tagName , prop , urls , valid ) {
663- Object . keys ( urls ) . forEach ( function ( name ) {
663+ Object . keys ( urls ) . forEach ( function ( name ) {
664664 var props = { }
665665
666666 props [ prop ] = urls [ name ]
0 commit comments