]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Fix CRLF newlines upon submission changes
authorVeronika Kabatova <vkabatov@redhat.com>
Wed, 7 Feb 2018 13:23:15 +0000 (14:23 +0100)
committerStephen Finucane <stephen@that.guru>
Fri, 9 Feb 2018 10:28:01 +0000 (10:28 +0000)
commit7f6685a2a0b12c08c39f9de84684de8d033c57f1
tree7012a8e0a030b23537bbf1caefcb68d4c06591bf
parent6ce361f009299e3e73c6fc73278bb76ab7fe9b03
Fix CRLF newlines upon submission changes

After changing submission via admin interface, CRLF newlines are
suddenly present in the body. Replace them back to '\n'.

The issue was found after modifying submission via admin interface
using Python 2 and downloading the respective mbox file (git choked on
downloaded patch because of malformed line endings). Python 3's mail
module uses '\n' internally so the problem doesn't manifest there, but
the content received by Django/JS is still saved in the database with
CRLF line endings which shouldn't be there.

Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/models.py