xxxxxxxxxx
51
1
<templates>
2
<!-- esc, evaluates and returns @t-esc after having xml-escaped it -->
3
<t t-name="esc-literal">
4
<t t-esc="'ok'"/>
5
</t>
6
<t t-name="esc-variable">
7
<t t-esc="ok"/>
8
</t>
9
<t t-name="esc-toescape">
10
<t t-esc="ok"/>
11
</t>
12
13
<!-- escf, same as t-esc, but @t-escf is a format string -->
14
<t t-name="escf-noformat-literal">
15
<t t-escf="ok"/>
16
</t>
17
<t t-name="escf-simpleformat-variable">
18
<t t-escf="#{value}"/>
19
</t>
20
<t t-name="escf-format-variable">
21
<t t-escf="[#{value}]"/>
22
</t>
23
<t t-name="escf-format-variable-with-escapes">
24
<t t-escf="[#{value}]"/>
25
</t>
26
27
<!-- raw, evaluates and returns @t-raw directly (no escaping) -->
28
<t t-name="raw-literal">
29
<t t-raw="'ok'"/>
30
</t>
31
<t t-name="raw-variable">
32
<t t-raw="ok"/>
33
</t>
34
<t t-name="raw-notescaped">
35
<t t-raw="ok"/>
36
</t>
37
38
<!-- rawf, same as t-raw, but @t-rawf is a format string -->
39
<t t-name="rawf-noformat-literal">
40
<t t-escf="ok"/>
41
</t>
42
<t t-name="rawf-simpleformat-variable">
43
<t t-escf="#{value}"/>
44
</t>
45
<t t-name="rawf-format-variable">
46
<t t-escf="[#{value}]"/>
47
</t>
48
<t t-name="rawf-format-variable-notescaped">
49
<t t-rawf="[#{value}]"/>
50
</t>
51
</templates>
已复制