File tree Expand file tree Collapse file tree 2 files changed +1
-19
lines changed Expand file tree Collapse file tree 2 files changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ export function toHtml(node, options = {}) {
4141 tightLists : options . tightCommaSeparatedLists ,
4242 tightClose : options . tightSelfClosing ,
4343 collapseEmpty : options . collapseEmptyAttributes ,
44- // @ts -ignore `allowDangerousHTML` is deprecated.
45- dangerous : options . allowDangerousHtml || options . allowDangerousHTML ,
44+ dangerous : options . allowDangerousHtml ,
4645 voids : options . voids || htmlVoidElements . concat ( ) ,
4746 entities : options . entities || { } ,
4847 close : options . closeSelfClosing ,
Original file line number Diff line number Diff line change @@ -19,22 +19,5 @@ test('`element`', function (t) {
1919 'should not encode `raw`s in `allowDangerousHtml` mode'
2020 )
2121
22- t . deepEqual (
23- // @ts -ignore nonstandard.
24- toHtml ( u ( 'raw' , '<script>alert("XSS!")</script>' ) , {
25- allowDangerousHTML : true
26- } ) ,
27- '<script>alert("XSS!")</script>' ,
28- 'should support the legacy `allowDangerousHTML` (#1)'
29- )
30- t . deepEqual (
31- // @ts -ignore nonstandard.
32- toHtml ( u ( 'raw' , '<script>alert("XSS!")</script>' ) , {
33- allowDangerousHTML : true
34- } ) ,
35- '<script>alert("XSS!")</script>' ,
36- 'should support the legacy `allowDangerousHTML` (#2)'
37- )
38-
3922 t . end ( )
4023} )
You can’t perform that action at this time.
0 commit comments