Decode the encoded argument information

This commit is contained in:
Paul Kaplan 2017-11-29 10:34:00 -05:00
parent 63698dad8a
commit 80b4dab104
2 changed files with 3 additions and 1 deletions

View file

@ -32,6 +32,7 @@
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"copy-webpack-plugin": "4.2.1",
"decode-html": "2.0.0",
"escape-html": "1.0.3",
"eslint": "^4.5.0",
"eslint-config-scratch": "^5.0.0",

View file

@ -1,4 +1,5 @@
const html = require('htmlparser2');
const decodeHtml = require('decode-html');
/**
* Convert a part of a mutation DOM to a mutation VM object, recursively.
@ -11,7 +12,7 @@ const mutatorTagToObject = function (dom) {
obj.children = [];
for (const prop in dom.attribs) {
if (prop === 'xmlns') continue;
obj[prop] = dom.attribs[prop];
obj[prop] = decodeHtml(dom.attribs[prop]);
}
for (let i = 0; i < dom.children.length; i++) {
obj.children.push(