diff options
| author | Jeremy Kersten <jke@odoo.com> | 2021-01-12 14:40:06 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-02-25 15:17:58 +0000 |
| commit | 38983d123d171ac3cc1efacd99d9776f0ed08734 (patch) | |
| tree | 81d01e16e6a8b4b88656d121686ed073d5a5faf9 /addons/web_editor | |
| parent | 1b729171c5deac4fadebcff013aa061a96860b09 (diff) | |
[FIX] base, web_editor, website: add missing encoding on etree.tostring
Since lxml 4.5.0 that use now use libxml2 2.9.10, without it, it can crash.
Here sample of content that is broken:
https://drive.google.com/file/d/1gB2-jl4fabHscLjH9OZc4WZgtSEbCVj7/view?usp=sharing
note: this commit is to merge 3 changes of #64526
opw-2428617
opw-2428664
closes odoo/odoo#66866
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web_editor')
| -rw-r--r-- | addons/web_editor/models/ir_ui_view.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/models/ir_ui_view.py b/addons/web_editor/models/ir_ui_view.py index e7fe4b3617d..884e1b5a2f8 100644 --- a/addons/web_editor/models/ir_ui_view.py +++ b/addons/web_editor/models/ir_ui_view.py @@ -343,7 +343,7 @@ class IrUiView(models.Model): full_snippet_key = '%s.%s' % (app_name, snippet_key) # html to xml to add '/' at the end of self closing tags like br, ... - xml_arch = etree.tostring(html.fromstring(arch)) + xml_arch = etree.tostring(html.fromstring(arch), encoding='utf-8') new_snippet_view_values = { 'name': name, 'key': full_snippet_key, |
