user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: meta@public-inbox.org
Subject: [BUG] Unescaped '&' ampersands in atom header links
Date: Mon, 27 Nov 2023 09:17:11 +0100	[thread overview]
Message-ID: <87o7ff4nlk.fsf@collabora.com> (raw)

Hi,

When parsing outputs from lore.kernel.org with Python3 xml.dom.minidom I
noticed that, for queries that contain '&' characters, they aren't
escaped in the href attributes of the title tags in atom feed headers.

So, for example, for this request:

https://lore.kernel.org/all/?x=A&q=driver+core%3A+Fix+wait_for_device_probe%28%29+%26+deferred_probe_timeout+interaction

The atom header in the output contains:

<title
type="html">driver core: Fix wait_for_device_probe() &#38; deferred_probe_timeout interaction - search results</title><link
rel="alternate"
type="text/html"
href="http://lore.kernel.org/all/?q=driver+core:+Fix+wait_for_device_probe()+&+deferred_probe_timeout+interaction"/><link
rel="self"
href="http://lore.kernel.org/all/?q=driver+core:+Fix+wait_for_device_probe()+&+deferred_probe_timeout+interaction&amp;x=A"/>

where the '&' character is escaped in the text of the <title> tag but
not in the href attributes. Shouldn't these be escaped as well? If so,
the fix should be most likely located in WwwAtomStream.pm:atom_header().

Cheers,
Ricardo

             reply	other threads:[~2023-11-27  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27  8:17 Ricardo Cañuelo [this message]
2023-11-27 10:23 ` [BUG] Unescaped '&' ampersands in atom header links Eric Wong
2023-11-27 21:55   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7ff4nlk.fsf@collabora.com \
    --to=ricardo.canuelo@collabora.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).