[IMP] app, compiler: introduce t-out

t-out automatically escaped content when it is a string not marked
with the `markup` function

t-out renders the raw content if it is a Block, or if it has been marked
with the `markup` funtion.

t-esc has been kept since it is safe and is optimized to render text nodes.

all t-raw calls are in fact the same as t-out.
This commit is contained in:
Lucas Perais (lpe)
2021-11-15 15:01:56 +01:00
committed by Aaron Bohy
parent 1761af9c24
commit b902edc1be
62 changed files with 1780 additions and 1306 deletions
+2 -2
View File
@@ -10,9 +10,9 @@ snapshotEverything();
describe("misc", () => {
test("global", () => {
const context = new TestContext();
const _calleeAsc = `<año t-att-falló="'agüero'" t-raw="0"/>`;
const _calleeAsc = `<año t-att-falló="'agüero'" t-out="0"/>`;
const _calleeUsesFoo = `<span t-esc="foo">foo default</span>`;
const _calleeAscToto = `<div t-raw="toto">toto default</div>`;
const _calleeAscToto = `<div t-out="toto">toto default</div>`;
const caller = `
<div>
<t t-foreach="[4,5,6]" t-as="value" t-key="value">