@@ -351,17 +351,17 @@ test('sanitize()', function (t) {
351
351
st . test ( 'href`' , function ( sst ) {
352
352
testAllURLs ( sst , 'a' , 'href' , {
353
353
valid : {
354
- ' anchor' : '#heading' ,
355
- ' relative' : '/file.html' ,
356
- ' search' : 'example.com?foo:bar' ,
357
- ' hash' : 'example.com#foo:bar' ,
354
+ anchor : '#heading' ,
355
+ relative : '/file.html' ,
356
+ search : 'example.com?foo:bar' ,
357
+ hash : 'example.com#foo:bar' ,
358
358
'protocol-less' : 'www.example.com' ,
359
- ' mailto' : 'mailto:foo@bar.com' ,
360
- ' https' : 'http://example.com' ,
361
- ' http' : 'http://example.com'
359
+ mailto : 'mailto:foo@bar.com' ,
360
+ https : 'http://example.com' ,
361
+ http : 'http://example.com'
362
362
} ,
363
363
invalid : {
364
- ' javascript' : 'javascript:alert(1)' ,
364
+ javascript : 'javascript:alert(1)' ,
365
365
'Unicode LS/PS I' : '\u2028javascript:alert(1)' ,
366
366
'Unicode Whitespace (#1)' : ' javascript:alert(1)' ,
367
367
'Unicode Whitespace (#2)' : ' javascript:alert(1)' ,
@@ -376,17 +376,17 @@ test('sanitize()', function (t) {
376
376
st . test ( '`cite`' , function ( sst ) {
377
377
testAllURLs ( sst , 'blockquote' , 'cite' , {
378
378
valid : {
379
- ' anchor' : '#heading' ,
380
- ' relative' : '/file.html' ,
381
- ' search' : 'example.com?foo:bar' ,
382
- ' hash' : 'example.com#foo:bar' ,
379
+ anchor : '#heading' ,
380
+ relative : '/file.html' ,
381
+ search : 'example.com?foo:bar' ,
382
+ hash : 'example.com#foo:bar' ,
383
383
'protocol-less' : 'www.example.com' ,
384
- ' https' : 'http://example.com' ,
385
- ' http' : 'http://example.com'
384
+ https : 'http://example.com' ,
385
+ http : 'http://example.com'
386
386
} ,
387
387
invalid : {
388
- ' mailto' : 'mailto:foo@bar.com' ,
389
- ' javascript' : 'javascript:alert(1)' ,
388
+ mailto : 'mailto:foo@bar.com' ,
389
+ javascript : 'javascript:alert(1)' ,
390
390
'Unicode LS/PS I' : '\u2028javascript:alert(1)' ,
391
391
'Unicode Whitespace (#1)' : ' javascript:alert(1)' ,
392
392
'Unicode Whitespace (#2)' : ' javascript:alert(1)' ,
@@ -401,17 +401,17 @@ test('sanitize()', function (t) {
401
401
st . test ( '`src`' , function ( sst ) {
402
402
testAllURLs ( sst , 'img' , 'src' , {
403
403
valid : {
404
- ' anchor' : '#heading' ,
405
- ' relative' : '/file.html' ,
406
- ' search' : 'example.com?foo:bar' ,
407
- ' hash' : 'example.com#foo:bar' ,
404
+ anchor : '#heading' ,
405
+ relative : '/file.html' ,
406
+ search : 'example.com?foo:bar' ,
407
+ hash : 'example.com#foo:bar' ,
408
408
'protocol-less' : 'www.example.com' ,
409
- ' https' : 'http://example.com' ,
410
- ' http' : 'http://example.com'
409
+ https : 'http://example.com' ,
410
+ http : 'http://example.com'
411
411
} ,
412
412
invalid : {
413
- ' mailto' : 'mailto:foo@bar.com' ,
414
- ' javascript' : 'javascript:alert(1)' ,
413
+ mailto : 'mailto:foo@bar.com' ,
414
+ javascript : 'javascript:alert(1)' ,
415
415
'Unicode LS/PS I' : '\u2028javascript:alert(1)' ,
416
416
'Unicode Whitespace (#1)' : ' javascript:alert(1)' ,
417
417
'Unicode Whitespace (#2)' : ' javascript:alert(1)' ,
@@ -426,17 +426,17 @@ test('sanitize()', function (t) {
426
426
st . test ( '`longDesc`' , function ( sst ) {
427
427
testAllURLs ( sst , 'img' , 'longDesc' , {
428
428
valid : {
429
- ' anchor' : '#heading' ,
430
- ' relative' : '/file.html' ,
431
- ' search' : 'example.com?foo:bar' ,
432
- ' hash' : 'example.com#foo:bar' ,
429
+ anchor : '#heading' ,
430
+ relative : '/file.html' ,
431
+ search : 'example.com?foo:bar' ,
432
+ hash : 'example.com#foo:bar' ,
433
433
'protocol-less' : 'www.example.com' ,
434
- ' https' : 'http://example.com' ,
435
- ' http' : 'http://example.com'
434
+ https : 'http://example.com' ,
435
+ http : 'http://example.com'
436
436
} ,
437
437
invalid : {
438
- ' mailto' : 'mailto:foo@bar.com' ,
439
- ' javascript' : 'javascript:alert(1)' ,
438
+ mailto : 'mailto:foo@bar.com' ,
439
+ javascript : 'javascript:alert(1)' ,
440
440
'Unicode LS/PS I' : '\u2028javascript:alert(1)' ,
441
441
'Unicode Whitespace (#1)' : ' javascript:alert(1)' ,
442
442
'Unicode Whitespace (#2)' : ' javascript:alert(1)' ,
0 commit comments