GNU bug report logs - #79600
31.0.50; [PATCH] newsticker.el does not escape xml string properly

Previous Next

Package: emacs;

Reported by: LdBeth <andpuke <at> foxmail.com>

Date: Wed, 8 Oct 2025 13:15:02 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 79600 in the body.
You can then email your comments to 79600 AT debbugs.gnu.org in the normal way.

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#79600; Package emacs. (Wed, 08 Oct 2025 13:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to LdBeth <andpuke <at> foxmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Oct 2025 13:15:02 GMT) Full text and rfc822 format available.

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

From: LdBeth <andpuke <at> foxmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; [PATCH] newsticker.el does not escape xml string properly
Date: Wed, 08 Oct 2025 21:12:47 +0800
[Message part 1 (text/plain, inline)]
The `newsticker--unxml' function does not properly handle the case when
the parsed XML string nodes contains characters that could confuse the
HTML parser.

Using `xml-escape-string' from xml.el to fix this.

[patch.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79600; Package emacs. (Wed, 08 Oct 2025 14:24:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: LdBeth <andpuke <at> foxmail.com>, Ulf Jasper <ulf.jasper <at> web.de>
Cc: 79600 <at> debbugs.gnu.org
Subject: Re: bug#79600: 31.0.50;
 [PATCH] newsticker.el does not escape xml string properly
Date: Wed, 08 Oct 2025 17:23:30 +0300
> Date: Wed, 08 Oct 2025 21:12:47 +0800
> From: LdBeth <andpuke <at> foxmail.com>
> 
> The `newsticker--unxml' function does not properly handle the case when
> the parsed XML string nodes contains characters that could confuse the
> HTML parser.
> 
> Using `xml-escape-string' from xml.el to fix this.

Thanks.  Ulf, any comments?

> --- newst-backend.el.old	2025-10-08 21:08:58
> +++ newst-backend.el	2025-10-08 21:09:13
> @@ -1110,9 +1110,9 @@
>  (defun newsticker--unxml (node)
>    "Reverse parsing of an xml string.
>  Restore an xml-string from a an xml NODE that was returned by xml-parse..."
> -  (if (or (not node) (stringp node))
> -      node
> -    (newsticker--unxml-node node)))
> +  (cond ((not node) node)
> +        ((stringp node) (xml-escape-string node))
> +        (t (newsticker--unxml-node node))))
>  
>  (defun newsticker--unxml-node (node)
>    "Actually restore xml-string of an xml NODE."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79600; Package emacs. (Wed, 08 Oct 2025 14:30:03 GMT) Full text and rfc822 format available.

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

From: Ulf Jasper <ulf.jasper <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: LdBeth <andpuke <at> foxmail.com>, 79600 <at> debbugs.gnu.org
Subject: Re: bug#79600: 31.0.50; [PATCH] newsticker.el does not escape xml
 string properly
Date: Wed, 08 Oct 2025 16:29:02 +0200
Am 08.10.2025 um 17:23 (+0300) schrieb Eli Zaretskii:
>> Date: Wed, 08 Oct 2025 21:12:47 +0800
>> From: LdBeth <andpuke <at> foxmail.com>
>> 
>> The `newsticker--unxml' function does not properly handle the case when
>> the parsed XML string nodes contains characters that could confuse the
>> HTML parser.
>> 
>> Using `xml-escape-string' from xml.el to fix this.
>
> Thanks.  Ulf, any comments?

Looks good to me! 

>> --- newst-backend.el.old	2025-10-08 21:08:58
>> +++ newst-backend.el	2025-10-08 21:09:13
>> @@ -1110,9 +1110,9 @@
>>  (defun newsticker--unxml (node)
>>    "Reverse parsing of an xml string.
>>  Restore an xml-string from a an xml NODE that was returned by xml-parse..."
>> -  (if (or (not node) (stringp node))
>> -      node
>> -    (newsticker--unxml-node node)))
>> +  (cond ((not node) node)
>> +        ((stringp node) (xml-escape-string node))
>> +        (t (newsticker--unxml-node node))))
>>  
>>  (defun newsticker--unxml-node (node)
>>    "Actually restore xml-string of an xml NODE."




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 08 Oct 2025 15:10:02 GMT) Full text and rfc822 format available.

Notification sent to LdBeth <andpuke <at> foxmail.com>:
bug acknowledged by developer. (Wed, 08 Oct 2025 15:10:03 GMT) Full text and rfc822 format available.

Message #16 received at 79600-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ulf Jasper <ulf.jasper <at> web.de>
Cc: andpuke <at> foxmail.com, 79600-done <at> debbugs.gnu.org
Subject: Re: bug#79600: 31.0.50; [PATCH] newsticker.el does not escape xml
 string properly
Date: Wed, 08 Oct 2025 18:08:24 +0300
> From: Ulf Jasper <ulf.jasper <at> web.de>
> Cc: LdBeth <andpuke <at> foxmail.com>,  79600 <at> debbugs.gnu.org
> Date: Wed, 08 Oct 2025 16:29:02 +0200
> 
> Am 08.10.2025 um 17:23 (+0300) schrieb Eli Zaretskii:
> >> Date: Wed, 08 Oct 2025 21:12:47 +0800
> >> From: LdBeth <andpuke <at> foxmail.com>
> >> 
> >> The `newsticker--unxml' function does not properly handle the case when
> >> the parsed XML string nodes contains characters that could confuse the
> >> HTML parser.
> >> 
> >> Using `xml-escape-string' from xml.el to fix this.
> >
> > Thanks.  Ulf, any comments?
> 
> Looks good to me! 

Thanks, installed on the master branch, and closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79600; Package emacs. (Wed, 08 Oct 2025 15:32:02 GMT) Full text and rfc822 format available.

Message #19 received at 79600-done <at> debbugs.gnu.org (full text, mbox):

From: Ulf Jasper <ulf.jasper <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: andpuke <at> foxmail.com, 79600-done <at> debbugs.gnu.org
Subject: Re: bug#79600: 31.0.50; [PATCH] newsticker.el does not escape xml
 string properly
Date: Wed, 08 Oct 2025 17:30:50 +0200
Thanks





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 06 Nov 2025 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified today.

Previous Next


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