Crash when trying to edit an html text with non utf-8 characters
Steps to reproduce:
1. Create a new Report from Adminitration -> User Interface -> Actions -> Reports
2. Use the attached file as data and html template extensions.
3. Once saved use the Edit button to open the template content as HTML.
An internal server error is shown on the page and the following error is logged on the server:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 66: invalid continuation byte
File "trytond/protocols/wrappers.py", line 164, in wrapper
result = func(request, pool, *args, **kwargs)
File "trytond/ir/routes.py", line 68, in html_editor
text = text.decode('utf-8')
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
Nuevo pedido recibido.html | @pokoli | 2019-08-15 11:36:54.350000 UTC | text/plain |