GNU bug report logs - #24831
shr mangling messages

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 31 Oct 2016 02:47:02 UTC

Severity: normal

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#24831: closed (shr mangling messages)
Date: Sun, 06 Nov 2016 23:33:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 07 Nov 2016 08:32:06 +0900
with message-id <b4mshr4chhl.fsf <at> jpl.org>
and subject line Re: bug#24831: shr mangling messages
has caused the debbugs.gnu.org bug report #24831,
regarding shr mangling messages
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
24831: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24831
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>
Subject: shr mangling messages
Date: Mon, 31 Oct 2016 10:45:58 +0800
[Message part 3 (text/plain, inline)]
Gentelmen, the "shr" program is mangling messages.

It could remove vital words, causing arguments:

"I did include the address!" "No you didn't." "Yes I did. Your mail
reader probably cut it out."

We're talking data loss here. It may still be on the disk, but not shown
to the user.

True, the HTML might not be perfect, but at least Chromium, Firefox,
etc. show it fine.

>>>>> "KY" == Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

KY> Emacs-w3m renders it as:

KY>  http://w                                                                     
KY>           Hi, you have a new email from Catherineme                           
KY>  [25]                                                                         
KY>           View your inbox at http://www.travel-buddies.com/Inbox.aspx         
                                                                              
KY>  © Travel Buddies 2015 | All rights reserved                                  

Hmmm, w3m -dump on the attachment shows the first URL in full.

KY> However shr renders it as:

KY> Travel Buddies

    
KY>   © Travel Buddies 2015 | All rights reserved    
KY> http://www.travel-buddies.com/ 
KY> * 


KY> There lacks the "Hi, you have a new mail" message.  The return
KY> value of `libxml-parse-html-region' contains the message as

KY> (h1 nil (span nil "Hi, you have a new email from") "Catherineme")
KY> (p nil "View your inbox at "
KY>    (a ((href . "http://www.travel-buddies.com/Inbox.aspx"))
KY>       "http://www.travel-buddies.com/Inbox.aspx"))

KY> regardless of whether all style specs are removed[1] or not
KY> (three nil portions above are replaced with style specs if they
KY>  are not removed).  So, style specs are not cause of not
KY> displaying some meaningful message in an html mail, I believe.
KY> In that case, making shr display images does not help.

KY> I think there's something wrong in shr.el, and what you should
KY> do would be to send a bug report to the Emacs bug team, i.e.,
KY> M-x report-emacs-bug, with the sample html part (I'm not so
KY> familiar with recent shr, sorry).  Note that a mail containing
KY> html part might be rejected by the server, so putting it in your
KY> web site separately would be better.

KY> [1] I tested it by modifying mm-shr so as to remove style specs.

OK I'll send the message,

[SHRcutOFFmessage.gz (application/gzip, attachment)]
[Message part 5 (text/plain, inline)]
here in this bug report about In GNU Emacs 24.5.1 (i686-pc-linux-gnu,
GTK+ Version 3.21.5) of 2016-09-06 on x86-csail-01, modified by Debian.
[Message part 6 (message/rfc822, inline)]
From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: jidanni <at> jidanni.org, 24831-done <at> debbugs.gnu.org
Subject: Re: bug#24831: shr mangling messages
Date: Mon, 07 Nov 2016 08:32:06 +0900
On Fri, 04 Nov 2016 12:17:18 +0100, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>> Well, is this a reasonable operation?
>>
>> (with-temp-buffer
>>   (insert "<html><body>Foo</body></html>Bar")
>>   (libxml-parse-html-region (point-min) (point-max)))
>>  => (html nil (body nil "Foo") (html nil (p nil "Bar")))

> Yes, it's two <html> elements after each other.  In HTML, the <html>
> start (and end) tags are optional.

I see.  But I'm sorry for my confusion; that extra text appearing
is not due to my change.  So, I'm closing this bug.  Thanks.


This bug report was last modified 8 years and 255 days ago.

Previous Next


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