[FIX] qweb: t-esc inside t-call using outside t-set

Before this commit, the generated code was incorrect, and crashed,
when there was a t-esc="abc" in a subtemplate, with t-set="abc"
done outside the subtemplate, with syntax <t t-set="abc">value</t>.
This commit is contained in:
Aaron Bohy
2020-05-14 15:40:04 +02:00
committed by Géry Debongnie
parent b8d3618afa
commit 2af8cccd65
3 changed files with 25 additions and 0 deletions
+1
View File
@@ -49,6 +49,7 @@ function compileValueNode(value: any, node: Element, qweb: QWeb, ctx: Compilatio
if (ctx.escaping) {
let protectID;
if (value.hasBody) {
ctx.rootContext.shouldDefineUtils = true;
protectID = ctx.startProtectScope();
ctx.addLine(
`${exprID} = ${exprID} instanceof utils.VDomArray ? utils.vDomToString(${exprID}) : ${exprID};`