mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[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:
committed by
Géry Debongnie
parent
b8d3618afa
commit
2af8cccd65
@@ -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};`
|
||||
|
||||
Reference in New Issue
Block a user