We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 246252a commit d486007Copy full SHA for d486007
src/parser.coffee
@@ -52,6 +52,8 @@ class exports.Parser extends events
52
@emit err
53
54
assignOrPush: (obj, key, newValue) =>
55
+ return if key == '__proto__'
56
+ return if key == 'constructor'
57
if key not of obj
58
if not @options.explicitArray
59
obj[key] = newValue
@@ -113,7 +115,7 @@ class exports.Parser extends events
113
115
if @options.mergeAttrs
114
116
@assignOrPush obj, processedKey, newValue
117
else
- obj[attrkey][processedKey] = newValue
118
+ @assignOrPush obj[attrkey], processedKey, newValue
119
120
# need a place to store the node name
121
obj["#name"] = if @options.tagNameProcessors then processItem(@options.tagNameProcessors, node.name) else node.name
0 commit comments