diff options
author | Michael J Gruber <github@grubix.eu> | 2019-09-06 10:08:19 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2019-09-06 19:10:42 +0100 |
commit | 244180d52f4ace8181bb288e77402c766ad620c1 (patch) | |
tree | 22d875c95c371fd2ebf83d7d91c890d043f0f824 | |
parent | 1ce0d130d0a042c8d8c4971efcd7848b35b0148d (diff) |
fix display of HTML-only mails
"Prefer plain text" should mean just that, and not "ignore HTML even in
the absence of a text part".
21c399ee ("Update to new (3.6) email message API", 2018-12-08) had
introduced the "ignore" behaviour. Make it "prefer" again.
-rw-r--r-- | alot/db/utils.py | 2 | ||||
-rw-r--r-- | tests/db/test_utils.py | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/alot/db/utils.py b/alot/db/utils.py index bdb76f1e..194e726a 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -477,7 +477,7 @@ def extract_body(mail): """ if settings.get('prefer_plaintext'): - preferencelist = ('plain',) + preferencelist = ('plain', 'html') else: preferencelist = ('html', 'plain') diff --git a/tests/db/test_utils.py b/tests/db/test_utils.py index 59a46435..5fe7099f 100644 --- a/tests/db/test_utils.py +++ b/tests/db/test_utils.py @@ -677,7 +677,6 @@ class TestExtractBody(unittest.TestCase): subtype='html') return mail - @unittest.expectedFailure @mock.patch('alot.db.utils.settings.get', mock.Mock(return_value=True)) @mock.patch('alot.db.utils.settings.mailcap_find_match', mock.Mock(return_value=(None, {'view': 'cat'}))) |