diff --git a/lib/init.js b/lib/init.js index 1cee35e..ad9175e 100644 --- a/lib/init.js +++ b/lib/init.js @@ -42,7 +42,9 @@ module.exports = function init(modules) { // Close tag, if needed if (VOID_ELEMENTS[tagName] !== true && !svg || svg && CONTAINER_ELEMENTS[tagName] === true) { - if (vnode.text) { + if (vnode.data && vnode.data.props && vnode.data.props.innerHTML) { + tag.push(vnode.data.props.innerHTML); + } else if (vnode.text) { tag.push(vnode.text); } else if (vnode.children) { vnode.children.forEach(function (child) { diff --git a/lib/modules/attributes.js b/lib/modules/attributes.js index d3f7673..e2a2da2 100644 --- a/lib/modules/attributes.js +++ b/lib/modules/attributes.js @@ -56,6 +56,9 @@ function setAttributes(values, target) { target['class'] = value.split(' '); return; } + if (key === 'innerHTML') { + return; + } target[key] = value; }); } \ No newline at end of file diff --git a/src/init.js b/src/init.js index ff6e734..6d48bfa 100644 --- a/src/init.js +++ b/src/init.js @@ -45,7 +45,9 @@ module.exports = function init (modules) { // Close tag, if needed if ((VOID_ELEMENTS[tagName] !== true && !svg) || (svg && CONTAINER_ELEMENTS[tagName] === true)) { - if (vnode.text) { + if (vnode.data.props && vnode.data.props.innerHTML) { + tag.push(vnode.data.props.innerHTML) + } else if (vnode.text) { tag.push(vnode.text) } else if (vnode.children) { vnode.children.forEach(function (child) { diff --git a/src/modules/attributes.js b/src/modules/attributes.js index 2451a3c..8e49165 100644 --- a/src/modules/attributes.js +++ b/src/modules/attributes.js @@ -54,6 +54,9 @@ function setAttributes (values, target) { target['class'] = value.split(' ') return } + if (key === 'innerHTML') { + return + } target[key] = value }) }