X-Envelope-From: notmuch-bounces@notmuchmail.org Sat Sep 17 00:51:00 2022 Return-Path: X-Original-To: nmbug@yantan.tethera.net Delivered-To: nmbug@yantan.tethera.net Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A82685F37E; Sat, 17 Sep 2022 00:51:00 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1C7645DD5A for ; Sat, 17 Sep 2022 00:50:58 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 12D525FBC0; Fri, 16 Sep 2022 20:50:57 -0400 (EDT) Received: (nullmailer pid 2396731 invoked by uid 1000); Sat, 17 Sep 2022 00:50:55 -0000 From: David Bremner To: Jakub Wilk , notmuch@notmuchmail.org Subject: Re: [PATCH] nmweb: escape subject in search view In-Reply-To: <20220905110721.1881015-1-david@tethera.net> References: <20220822064717.qftn4tr7cs4r2ian@jwilk.net> <20220905110721.1881015-1-david@tethera.net> Date: Fri, 16 Sep 2022 21:50:55 -0300 Message-ID: <87mtay9634.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: BSY4N3M5VEVN7XXOLJJBQAIKFPSQCN4I X-Message-ID-Hash: BSY4N3M5VEVN7XXOLJJBQAIKFPSQCN4I X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit David Bremner writes: > Fix a bug reported by Jakub Wilk [1]. > > [1]: id:20220822064717.qftn4tr7cs4r2ian@jwilk.net > --- > devel/notmuch-web/nmweb.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/devel/notmuch-web/nmweb.py b/devel/notmuch-web/nmweb.py > index 928e4863..7b555c62 100755 > --- a/devel/notmuch-web/nmweb.py > +++ b/devel/notmuch-web/nmweb.py > @@ -131,7 +131,7 @@ env.globals['mailto_addrs'] = mailto_addrs > def link_msg(msg): > lnk = quote_plus(msg.messageid.encode('utf8')) > try: > - subj = msg.header('Subject') > + subj = html.escape(msg.header('Subject')) > except LookupError: > subj = "" > out = '%s' % (prefix, lnk, subj) > -- > 2.35.2 I've deployed this patch on nmbug.notmuchmail.org. It seems to do the right thing, at least for Jakub's original reported message. d _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org