Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/administration/on_premise/geo_ip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ request IP address. To do so:

.. code-block:: xml

<h1 class="text-center" t-esc="request.geoip.country.name or 'geoip failure'"/>
<h1 class="text-center" t-out="request.geoip.country.name or 'geoip failure'"/>

#. Save and refresh the page.

Expand Down
4 changes: 2 additions & 2 deletions content/developer/howtos/standalone_owl_application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ Now that we have created our assets bundle, we need to create a
<head>
<script type="text/javascript">
var odoo = {
csrf_token: "<t t-nocache="The csrf token must always be up to date." t-esc="request.csrf_token(None)"/>",
csrf_token: "<t t-out="request.csrf_token(None)"/>",
debug: "<t t-out="debug"/>",
__session_info__: <t t-esc="json.dumps(session_info)"/>,
__session_info__: <t t-out="json.dumps(session_info)"/>,
};
</script>
<t t-call-assets="your_module.assets_standalone_app" />
Expand Down
4 changes: 2 additions & 2 deletions content/developer/reference/backend/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ While formatting the template differently would prevent such vulnerabilities.

<div t-name="secure_template">
<div id="information-bar">
<div class="info"><t t-esc="message" /></div>
<div class="subject"><t t-esc="subject" /></div>
<div class="info"><t t-out="message" /></div>
<div class="subject"><t t-out="subject" /></div>
</div>
</div>

Expand Down
18 changes: 9 additions & 9 deletions content/developer/tutorials/web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ with the template modified to:
.. code-block:: xml

<t t-name="HomePageTemplate">
<div>Hello <t t-esc="name"/></div>
<div>Hello <t t-out="name"/></div>
</t>

will result in:
Expand All @@ -631,7 +631,7 @@ essentially be that set up by :func:`~odoo.Widget.init`):
.. code-block:: xml

<t t-name="HomePageTemplate">
<div>Hello <t t-esc="widget.name"/></div>
<div>Hello <t t-out="widget.name"/></div>
</t>

::
Expand Down Expand Up @@ -683,7 +683,7 @@ The ``t-esc`` directive can be used to output text:

.. code-block:: xml

<div>Hello <t t-esc="name"/></div>
<div>Hello <t t-out="name"/></div>

It takes a Javascript expression which is evaluated, the result of the
expression is then HTML-escaped and inserted in the document. Since it's an
Expand All @@ -692,13 +692,13 @@ complex expression like a computation:

.. code-block:: xml

<div><t t-esc="3+5"/></div>
<div><t t-out="3+5"/></div>

or method calls:

.. code-block:: xml

<div><t t-esc="name.toUpperCase()"/></div>
<div><t t-out="name.toUpperCase()"/></div>

Outputting HTML
~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -753,7 +753,7 @@ bind to each item during iteration.
<div>
<t t-foreach="names" t-as="name">
<div>
Hello <t t-esc="name"/>
Hello <t t-out="name"/>
</div>
</t>
</div>
Expand Down Expand Up @@ -886,7 +886,7 @@ Exercise
<t t-foreach="widget.products" t-as="product">
<span class="oe_products_item"
t-attf-style="background-color: {{ widget.color }};">
<t t-esc="product"/>
<t t-out="product"/>
</span>
<br/>
</t>
Expand Down Expand Up @@ -1602,7 +1602,7 @@ Exercises
</t>
<t t-name="PetToy">
<div class="oe_petstore_pettoy">
<p><t t-esc="item.name"/></p>
<p><t t-out="item.name"/></p>
<p><img t-att-src="'data:image/jpg;base64,'+item.image"/></p>
</div>
</t>
Expand Down Expand Up @@ -1744,7 +1744,7 @@ attributes are:

<t t-name="PetToy">
<div class="oe_petstore_pettoy" t-att-data-id="item.id">
<p><t t-esc="item.name"/></p>
<p><t t-out="item.name"/></p>
<p><img t-attf-src="data:image/jpg;base64,{{item.image}}"/></p>
</div>
</t>
Expand Down