summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorOlivier Dony <odo@odoo.com>2017-12-10 02:18:26 +0100
committerOlivier Dony <odo@odoo.com>2017-12-10 02:25:29 +0100
commit88841c392782223ff49814ddc893a632dbf400e8 (patch)
tree9584c764b42eef5c6f06fa85bfd65466122197b0 /addons/web/static/src/js/views/basic/basic_model.js
parent0a74272bed54a628e5717f04d318d6c80094731d (diff)
[FIX] payment_stripe: avoid crash on non-ascii cardholder names
`str.format()` is only safe with byte-strings arguments, not unicode. Unicode parameters would be automatically encoded using 'ascii' encoding, resulting in a UnicideEncoreError in case any non-ascii characters are present, which is quite likely. Using '%' formatting on a str format string works the other way around, and will cause the format string to be decoded into unicode if any unicode params are present. This is typically safer because we never use non-ascii characters in our format strings. It also feels more natural than having to coerce the format string to unicode using a u'' prefix. This issue does not occur in Python 3, where either syntax will work.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions