diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-10-09 19:38:22 +0000 |
|---|---|---|
| committer | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-10-12 14:57:22 +0000 |
| commit | f91422115c09be484f2868347566b6392ed0effd (patch) | |
| tree | 4819af15e22e4d79468242e73bbcee27cc1be07e /addons/web_editor/static/src/js | |
| parent | 59584974aa891b1182164adac3d3563d882bcfd7 (diff) | |
[FIX] website,website_sale: HTML escape dynamic snippet
Issue
To do on Community:
- Install website_sale (eCommerce)
- Go into Website app
- Navigate through Product/Products
- Edit 'Customizable Desk (CONFIG)' and add '&' and/or '<' and/or '>'
characters into the name
- Save
- Go to the Website app Dashboard and click on 'Go to Website'
- Click on 'Edit' button
- Drag and drop the 'Dynamic Product' snippet into the website
- Click on the block 'Your Dynamic Snippet wil be ...'
- In the right panel, in the 'Dynamic Product' snippet options,
chose a 'Template' and a 'Product Category'
A traceback is shown
Cause
the '&' character crashes lxml.etree.fromstring
Solution
ensure no '&' is sent to lxmx.etree.fromstring by using
odoo.tools.html_escape (in order to ensure no other problematic
characters are sent to the front) on the field values except when
not applicable (widget rendering with record_to_html should not be
escaped).
It is important to note here that this is applicable
to action servers that are used by the dynamic filter.
opw-2357027
closes odoo/odoo#59679
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
0 files changed, 0 insertions, 0 deletions
