File tree 2 files changed +1
-19
lines changed
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 = {}) {
41
41
tightLists : options . tightCommaSeparatedLists ,
42
42
tightClose : options . tightSelfClosing ,
43
43
collapseEmpty : options . collapseEmptyAttributes ,
44
- // @ts -ignore `allowDangerousHTML` is deprecated.
45
- dangerous : options . allowDangerousHtml || options . allowDangerousHTML ,
44
+ dangerous : options . allowDangerousHtml ,
46
45
voids : options . voids || htmlVoidElements . concat ( ) ,
47
46
entities : options . entities || { } ,
48
47
close : options . closeSelfClosing ,
Original file line number Diff line number Diff line change @@ -19,22 +19,5 @@ test('`element`', function (t) {
19
19
'should not encode `raw`s in `allowDangerousHtml` mode'
20
20
)
21
21
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
-
39
22
t . end ( )
40
23
} )
You can’t perform that action at this time.
0 commit comments