GNU bug report logs - #77314
[PATCH] Gnus HTML washing: Allow href surrounded by single-quotes

Previous Next

Package: emacs;

Reported by: Nuno Silva <nunojsg <at> gmail.com>

Date: Thu, 27 Mar 2025 15:17:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 77314 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77314; Package emacs. (Thu, 27 Mar 2025 15:17:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nuno Silva <nunojsg <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Mar 2025 15:17:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nuno Silva <nunojsg <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Gnus HTML washing: Allow href surrounded by single-quotes
Date: Thu, 27 Mar 2025 11:47:51 +0000
[Message part 1 (text/plain, inline)]
Gnus, both in the version of Emacs I use locally, and in the development
repository, has the following in gnus-html-wash-tags
(lisp/gnus/gnus-html.el):

    (when (string-match "href=\"\\([^\"]+\\)" parameters)

This, in turn, makes it so that, at least when this function is involved
with displaying HTML parts, links that have single quotes surrounding
their target in the code are not linkified in the article display.

I noticed this when reading RSS/Atom feeds via feedbase.org, which uses
single quotes for the link associated with each post, as opposed to
Gmane's Gwene (which does not show this issue and uses double quotes for
said links), in an instance of Gnus which is using

    (setq mm-text-html-renderer 'gnus-w3m)

The attached patch has the modification that fixes this for me locally,
applied to git HEAD; please let me know if something should be done
differently.

For further context, check the subthread on the gmane.discuss group at
news.gmane.io (over netnews) starting at [1], especially [2] and [3].

The patch is almost identical to the change mentioned in [3], but does
not escape the second ' in the new regexp.

[1] Message-ID: <vs0nno$vkt$1 <at> ciao.gmane.io>,
    news://news.gmane.io/vs0nno$vkt$1 <at> ciao.gmane.io
    
[2] Message-ID: <vs0r45$j1f$1 <at> ciao.gmane.io>,
    news://news.gmane.io/vs0r45$j1f$1 <at> ciao.gmane.io
    
[3] Message-ID: <vs1it5$12p2$2 <at> ciao.gmane.io>,
    news://news.gmane.io/vs1it5$12p2$2 <at> ciao.gmane.io


-- 
Nuno Silva (aka njsg)
[gnus-html-href-regex-single-quote.patch (text/plain, attachment)]

This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.