Skip to content

Commit 258cc10

Browse files
committed
[IMP] base,all: remove deprecated 't-esc' ir.qweb directive
closes #14675 Related: odoo/odoo#228421 Related: odoo/enterprise#95456 Related: odoo/upgrade#8493 Related: odoo/design-themes#1150 Related: odoo/upgrade-util#326 Signed-off-by: Christophe Matthieu (chm) <[email protected]>
1 parent 9457563 commit 258cc10

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

content/administration/on_premise/geo_ip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ request IP address. To do so:
4747

4848
.. code-block:: xml
4949
50-
<h1 class="text-center" t-esc="request.geoip.country.name or 'geoip failure'"/>
50+
<h1 class="text-center" t-out="request.geoip.country.name or 'geoip failure'"/>
5151
5252
#. Save and refresh the page.
5353

content/developer/howtos/standalone_owl_application.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ Now that we have created our assets bundle, we need to create a
117117
<head>
118118
<script type="text/javascript">
119119
var odoo = {
120-
csrf_token: "<t t-nocache="The csrf token must always be up to date." t-esc="request.csrf_token(None)"/>",
120+
csrf_token: "<t t-out="request.csrf_token(None)"/>",
121121
debug: "<t t-out="debug"/>",
122-
__session_info__: <t t-esc="json.dumps(session_info)"/>,
122+
__session_info__: <t t-out="json.dumps(session_info)"/>,
123123
};
124124
</script>
125125
<t t-call-assets="your_module.assets_standalone_app" />

content/developer/reference/backend/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ While formatting the template differently would prevent such vulnerabilities.
383383
384384
<div t-name="secure_template">
385385
<div id="information-bar">
386-
<div class="info"><t t-esc="message" /></div>
387-
<div class="subject"><t t-esc="subject" /></div>
386+
<div class="info"><t t-out="message" /></div>
387+
<div class="subject"><t t-out="subject" /></div>
388388
</div>
389389
</div>
390390

content/developer/tutorials/web.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ with the template modified to:
613613
.. code-block:: xml
614614
615615
<t t-name="HomePageTemplate">
616-
<div>Hello <t t-esc="name"/></div>
616+
<div>Hello <t t-out="name"/></div>
617617
</t>
618618
619619
will result in:
@@ -631,7 +631,7 @@ essentially be that set up by :func:`~odoo.Widget.init`):
631631
.. code-block:: xml
632632
633633
<t t-name="HomePageTemplate">
634-
<div>Hello <t t-esc="widget.name"/></div>
634+
<div>Hello <t t-out="widget.name"/></div>
635635
</t>
636636
637637
::
@@ -683,7 +683,7 @@ The ``t-esc`` directive can be used to output text:
683683

684684
.. code-block:: xml
685685
686-
<div>Hello <t t-esc="name"/></div>
686+
<div>Hello <t t-out="name"/></div>
687687
688688
It takes a Javascript expression which is evaluated, the result of the
689689
expression is then HTML-escaped and inserted in the document. Since it's an
@@ -692,13 +692,13 @@ complex expression like a computation:
692692

693693
.. code-block:: xml
694694
695-
<div><t t-esc="3+5"/></div>
695+
<div><t t-out="3+5"/></div>
696696
697697
or method calls:
698698

699699
.. code-block:: xml
700700
701-
<div><t t-esc="name.toUpperCase()"/></div>
701+
<div><t t-out="name.toUpperCase()"/></div>
702702
703703
Outputting HTML
704704
~~~~~~~~~~~~~~~
@@ -753,7 +753,7 @@ bind to each item during iteration.
753753
<div>
754754
<t t-foreach="names" t-as="name">
755755
<div>
756-
Hello <t t-esc="name"/>
756+
Hello <t t-out="name"/>
757757
</div>
758758
</t>
759759
</div>
@@ -886,7 +886,7 @@ Exercise
886886
<t t-foreach="widget.products" t-as="product">
887887
<span class="oe_products_item"
888888
t-attf-style="background-color: {{ widget.color }};">
889-
<t t-esc="product"/>
889+
<t t-out="product"/>
890890
</span>
891891
<br/>
892892
</t>
@@ -1602,7 +1602,7 @@ Exercises
16021602
</t>
16031603
<t t-name="PetToy">
16041604
<div class="oe_petstore_pettoy">
1605-
<p><t t-esc="item.name"/></p>
1605+
<p><t t-out="item.name"/></p>
16061606
<p><img t-att-src="'data:image/jpg;base64,'+item.image"/></p>
16071607
</div>
16081608
</t>
@@ -1744,7 +1744,7 @@ attributes are:
17441744
17451745
<t t-name="PetToy">
17461746
<div class="oe_petstore_pettoy" t-att-data-id="item.id">
1747-
<p><t t-esc="item.name"/></p>
1747+
<p><t t-out="item.name"/></p>
17481748
<p><img t-attf-src="data:image/jpg;base64,{{item.image}}"/></p>
17491749
</div>
17501750
</t>

0 commit comments

Comments
 (0)