emacs: sanitize subject in replies
authorJani Nikula <jani@nikula.org>
Tue, 26 Sep 2017 18:26:08 +0000 (21:26 +0300)
committerDavid Bremner <david@tethera.net>
Wed, 27 Sep 2017 11:15:02 +0000 (08:15 -0300)
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
test/T310-emacs.sh

index fd64b362b542b9bef5c169c29fb52ba2128c4f4e..7a341ebf0588a3e91ee3666b119701be2ca91c8f 100644 (file)
@@ -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))))
 
index 2ef566bac490ecc04d74068b960f54bca258d24b..4456bc6591588e9d6b13d4e1254274b20254c5d9 100755 (executable)
@@ -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@dottedmag.net")
            (notmuch-test-wait)