diff options
| author | Olivier Dony <odo@odoo.com> | 2018-02-15 11:02:38 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2018-02-15 11:12:28 +0100 |
| commit | f4bc3acdd593f453eae7126d242c7664e9187ae0 (patch) | |
| tree | 7dcc3671607e8245053290a90ca9ea2b117c3f70 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | 779275594654ca3a04c17b019b9fb932a630d8ae (diff) | |
[FIX] mail: correct errors in b64 images handling
Rev 666b59484201004e2cd8890a9c09b6dcf023a725 introduced an autodetection
mechanism for transforming base64 embedded images inside emails into
attachment with a Content-ID URL.
The patch suffered from several issues:
- the base64 detection regex failed to detect base64 data that is folded
over multiple lines - which happens to be the default in many Python
versions when a binary field is read, or when using the base64 codec
to encode a string.
(Those cases where left untouched and the image was therefore missing)
- there was a logic error in the code when the same image was present
multiple times, leading to an exception (`name` variable was
referenced before being assigned)
This patch addresses both issues.
Fixes OPW-815073
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions
