[FIX] ir.qweb: rendering non-string attributes could cause unicode errors (Issue...
authorOlivier Dony <odo@openerp.com>
Tue, 3 Jun 2014 22:08:01 +0000 (00:08 +0200)
committerOlivier Dony <odo@openerp.com>
Thu, 5 Jun 2014 08:11:23 +0000 (10:11 +0200)
commitd1b0d2586b82a883f21914c64b76aaffe3a42550
treeed344b281d2f764dfa73d9c3a2eb493cd6de55eb
parent651e5acd5dc3b0e4f88473d881c0d24bb7ef9020
[FIX] ir.qweb: rendering non-string attributes could cause unicode errors (Issue #282)

This occurs because werkzeug.utils.escape() auto-casts
non-basestring values to unicode, while we expect to be
working with bytestrings only.
So when evaluating attribute values, make sure we always
return bytestring values, never int, bool or unicode.
openerp/addons/base/ir/ir_qweb.py