[IMP] developer: add notes on entity references & fix illegal XML

Using `<` inside XML elements will result in a parsing error,
an entity reference should be used instead: `&lt;`.

closes odoo/documentation#5182

X-original-commit: a7743d513b
Signed-off-by: Levi Siuzdak (sile) <sile@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Levi Siuzdak (sile)
2023-07-19 11:44:00 +00:00
parent abe1a14e3c
commit 1b1340524f
2 changed files with 14 additions and 1 deletions

View File

@@ -218,6 +218,16 @@ services *OR* have a unit price which is *NOT* between 1000 and 2000'::
('unit_price', '>=', 1000),
('unit_price', '<', 2000)]
.. note:: XML does not allow ``<`` and ``&`` to be used inside XML
elements. To avoid parsing errors, entity references should be used:
``&lt;`` for ``<`` and ``&amp;`` for ``&``. Other entity references
(``&gt;``, ``&apos;`` & ``&quot;``) are optional.
.. example::
.. code-block:: xml
<filter name="negative" domain="[('test_val', '&lt;', 0)]"/>
.. exercise:: Add filter and Group By.
The following should be added to the previously created search view: