[FIX] qweb: properly handle t-raw in various situations

closes #325
closes #327
This commit is contained in:
Géry Debongnie
2019-10-12 09:07:25 +02:00
parent 41b0618c93
commit 3e8f60cefa
11 changed files with 153 additions and 69 deletions
+2 -2
View File
@@ -458,8 +458,8 @@ export class QWeb extends EventBus {
if (!(dName in QWeb.DIRECTIVE_NAMES)) {
throw new Error(`Unknown QWeb directive: '${attrName}'`);
}
if (node.tagName !== 't' && (attrName === 't-esc' || attrName === 't-raw')) {
const tNode = document.createElement('t');
if (node.tagName !== "t" && (attrName === "t-esc" || attrName === "t-raw")) {
const tNode = document.createElement("t");
tNode.setAttribute(attrName, node.getAttribute(attrName)!);
for (let child of Array.from(node.childNodes)) {
tNode.appendChild(child);