[PATCH 2/2] emacs: sanitize subject in replies
Jani Nikula
jani at nikula.org
Tue Sep 26 11:26:08 PDT 2017
Commit a7964c86d125 ("emacs: Sanitize authors and subjects in search
and show") added sanitization of header information for display. Do
the same for reply subjects.
This fixes the long-standing annoying artefact of certain versions of
mailman using tab as folding whitespace, leading to tabs in reply
subjects.
---
emacs/notmuch-mua.el | 2 +-
test/T310-emacs.sh | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index fd64b362b542..7a341ebf0588 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -218,7 +218,7 @@ mutiple parts get a header."
else
collect pair)))
(notmuch-mua-mail (plist-get reply-headers :To)
- (plist-get reply-headers :Subject)
+ (notmuch-sanitize (plist-get reply-headers :Subject))
(notmuch-headers-plist-to-alist reply-headers)
nil (notmuch-mua-get-switch-function))))
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 2ef566bac490..4456bc659158 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -402,7 +402,6 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Reply within emacs to a message with TAB in subject"
-test_subtest_known_broken
test_emacs '(let ((message-hidden-headers ''()))
(notmuch-search "id:1258471718-6781-1-git-send-email-dottedmag at dottedmag.net")
(notmuch-test-wait)
--
2.11.0
More information about the notmuch
mailing list