File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1659,5 +1659,13 @@ describe('sanitizeHtml', function() {
16591659 }
16601660 } ) , '<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient id="myGradient" gradientTransform="rotate(90)"><stop offset="5%" stop-color="gold"></stop><stop offset="95%" stop-color="red"></stop></linearGradient></defs><circle cx="5" cy="5" r="4" fill="url(\'#myGradient\')"></circle></svg>' ) ;
16611661 } ) ;
1662+ it ( 'should not process style sourceMappingURL with postCSS' , ( ) => {
1663+ assert . equal ( sanitizeHtml ( '<a style=\'background-image: url("/*# sourceMappingURL=../index.js */");\'></a>' , {
1664+ allowedAttributes : {
1665+ ...sanitizeHtml . defaults . allowedAttributes ,
1666+ a : [ 'style' ]
1667+ }
1668+ } ) , '<a style="background-image:url("/*# sourceMappingURL=../index.js */")"></a>' ) ;
1669+ } ) ;
16621670
16631671} ) ;
You can’t perform that action at this time.
0 commit comments