[FIX] qweb: do not render comments as text in t-raw

The code converting html to a vnode did not handle comment nodes as
expected.

closes #761
This commit is contained in:
Géry Debongnie
2020-10-19 16:11:02 +02:00
committed by aab-odoo
parent 33f7fc8e83
commit 8e018fbbda
3 changed files with 27 additions and 0 deletions
+3
View File
@@ -13,6 +13,9 @@ export function htmlToVDOM(html: string): VNode[] {
function htmlToVNode(node: ChildNode): VNode {
if (!(node instanceof Element)) {
if (node instanceof Comment) {
return h("!", node.textContent);
}
return { text: node.textContent! } as VNode;
}
const attrs = {};