[FIX] wesbite: fix wrong encoding from page generated by configurator

Before this commit, some snippets that contains special charactere like –
was wrongly displayed, since we removed the call to pycompat that did a
decode('utf-8') in previous version.

closes odoo/odoo#74041

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Jeremy Kersten
2021-07-20 13:14:06 +00:00
parent 58dc01a9a0
commit f0a484f7ae
+1 -1
View File
@@ -370,7 +370,7 @@ class Website(models.Model):
try:
view_id = self.env['website'].with_context(website_id=website.id).viewref(snippet)
if view_id:
el = html.fromstring(view_id._render(values=cta_data))
el = html.fromstring(view_id._render(values=cta_data).decode())
# Add the data-snippet attribute to identify the snippet
# for compatibility code