[FIX] base: ir.qweb: ensure element.tail is correctly encoded
element.{text,tail} are either ascii-compatible `str`, or `unicode`
when non-ascii-compatible. This could force the implicit decoding
of utf-8 encoded contents when joining template bits, breaking
the rendering.
Fixes #1085, and related to #1130
This commit is contained in:
committed by
Olivier Dony
parent
64ed698a58
commit
b64bd885b0
@@ -289,7 +289,7 @@ class QWeb(orm.AbstractModel):
|
||||
result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
|
||||
|
||||
if element.tail:
|
||||
result += element.tail
|
||||
result += element.tail.encode('utf-8')
|
||||
|
||||
if isinstance(result, unicode):
|
||||
return result.encode('utf-8')
|
||||
|
||||
Reference in New Issue
Block a user