From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A5DE26DE0C6B for ; Tue, 26 Sep 2017 11:26:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.014 X-Spam-Level: X-Spam-Status: No, score=0.014 tagged_above=-999 required=5 tests=[AWL=0.034, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BC4uLdWeafvX for ; Tue, 26 Sep 2017 11:26:26 -0700 (PDT) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by arlo.cworth.org (Postfix) with ESMTPS id CE8A06DE0C6D for ; Tue, 26 Sep 2017 11:26:22 -0700 (PDT) Received: by mail-lf0-f67.google.com with SMTP id c8so3122612lfe.2 for ; Tue, 26 Sep 2017 11:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K28Fzi0XzG+2KXNIpegDmfFh1QBxg1hjDLkA6vt+8hs=; b=UD0Dc4lFj24oAPM9YWgJANj3ghGsFNghOvw5WmuM7jsJXe4g6egiy8kdKCBTmaIVVR mq5L7vY6lu9oIiKCt0heru0exrARmNhDZxE/DYbQBqiZDMWtSC/uQpBj0GQal0EOnOzT dlj0TiYykm6G6+Ny54NdK/okjU+iKvrajnlxG/zax0wnLM4603L53zvWfP863Mf5sKC7 EkMmTufpWcEeFKdJw2ZTDyWAbwEJEHcOfijtuXCxBmQKlKIz3uHmq3bKVcDSqrl+IJog SoS96aBQKki5dC1p+bI7NAhKcbSlXZH5B4CyjrUQEiRYF8a+usXwgFpG0rjBZ/rKRlJC feOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K28Fzi0XzG+2KXNIpegDmfFh1QBxg1hjDLkA6vt+8hs=; b=MbJb5sSUqySoStkHMGecQHrDi4nf8CSp2RnH9hI2oMaWzbE3NdB150qKLex7vVS0RP ySXAYQ5V0N3z14nr0QPw9Cfz+zXJ6YAkYdccgzdTqq2RBhEA2YsXKQrt8vsMT+B8VHgp BTcZ2z91NYuQQYYZjSmfmjnVSYLAHNHyDrtQAi0JF4NbFmD6zZ2WrcZSeeIw/ooeDv2z WcSMVpXHjSiSv2vvu656dXRLJc2BeXzfezW7+9EzSu01Uc4C1vHXSE74UYJjkIPWWbrg Tn7Ugu8C3BnWIr1AKuAFX8bxlW3GoWB08ROxjXTlsZyj8b0GUrvufQxAPfNpccB6PDyM W2AQ== X-Gm-Message-State: AHPjjUgWk8SWTnzfc2UulFVUwiM0K3T2rq8/cMsGlEw60rAWvXFfp2+c J/S74uAPjVkX87FEo40DVSQUs4A1n2I= X-Google-Smtp-Source: AOwi7QD+eGZEhcBDPcgbej/U4FEvm+LKCyOsRHeX/D9WlF29Ia/1lJpYrpfH8evMOPof2+omz4yuuQ== X-Received: by 10.25.42.84 with SMTP id f81mr4558937lfl.255.1506450380922; Tue, 26 Sep 2017 11:26:20 -0700 (PDT) Received: from localhost (mobile-access-5d6a60-234.dhcp.inet.fi. [93.106.96.234]) by smtp.gmail.com with ESMTPSA id 67sm2005211ljq.63.2017.09.26.11.26.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Sep 2017 11:26:20 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: sanitize subject in replies Date: Tue, 26 Sep 2017 21:26:08 +0300 Message-Id: <20170926182608.30115-3-jani@nikula.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170926182608.30115-1-jani@nikula.org> References: <20170926182608.30115-1-jani@nikula.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2017 18:26:26 -0000 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@dottedmag.net") (notmuch-test-wait) -- 2.11.0