@@ -11,6 +11,8 @@ module.exports = toHtml
11
11
var quotationMark = '"'
12
12
var apostrophe = "'"
13
13
14
+ var deprecationWarningIssued = false
15
+
14
16
function toHtml ( node , options ) {
15
17
var settings = options || { }
16
18
var quote = settings . quote || quotationMark
@@ -29,6 +31,15 @@ function toHtml(node, options) {
29
31
)
30
32
}
31
33
34
+ if ( settings . allowDangerousHTML !== undefined ) {
35
+ if ( ! deprecationWarningIssued ) {
36
+ deprecationWarningIssued = true
37
+ console . warn (
38
+ 'Deprecation warning: `allowDangerousHTML` is a nonstandard option, use `allowDangerousHtml` instead'
39
+ )
40
+ }
41
+ }
42
+
32
43
return one (
33
44
{
34
45
valid : settings . allowParseErrors ? 0 : 1 ,
@@ -44,7 +55,7 @@ function toHtml(node, options) {
44
55
tightLists : settings . tightCommaSeparatedLists ,
45
56
tightClose : settings . tightSelfClosing ,
46
57
collapseEmpty : settings . collapseEmptyAttributes ,
47
- dangerous : settings . allowDangerousHTML ,
58
+ dangerous : settings . allowDangerousHtml || settings . allowDangerousHTML ,
48
59
voids : settings . voids || voids . concat ( ) ,
49
60
entities : settings . entities || { } ,
50
61
close : settings . closeSelfClosing ,
0 commit comments