Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] mail: correct errors in b64 images handling
Rev 666b594 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
- Loading branch information