all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
       [not found] ` <E1ahcv2-0005hP-Mn@vcs.savannah.gnu.org>
@ 2016-03-20 13:47   ` Stefan Monnier
  2016-03-20 13:49     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2016-03-20 13:47 UTC (permalink / raw
  To: emacs-devel; +Cc: Lars Magne Ingebrigtsen

> +	(setq payload (ignore-errors
> +                        (base64-decode-string payload))))

How 'bout with-demoted-errors?


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
  2016-03-20 13:47   ` [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images Stefan Monnier
@ 2016-03-20 13:49     ` Lars Magne Ingebrigtsen
  2016-03-20 15:26       ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2016-03-20 13:49 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> +	(setq payload (ignore-errors
>> +                        (base64-decode-string payload))))
>
> How 'bout with-demoted-errors?

I don't think the user cares that much -- if an image fails (whether to
downloading or being invalid), then eww should just continue signal that
in the document itself (with a broken image icon or the like).  But
messaging is too much chatter.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
  2016-03-20 13:49     ` Lars Magne Ingebrigtsen
@ 2016-03-20 15:26       ` Stefan Monnier
  2016-03-20 15:40         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2016-03-20 15:26 UTC (permalink / raw
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

>>> +	(setq payload (ignore-errors
>>> +                        (base64-decode-string payload))))
>> How 'bout with-demoted-errors?
> I don't think the user cares that much -- if an image fails (whether to
> downloading or being invalid), then eww should just continue signal that
> in the document itself (with a broken image icon or the like).  But
> messaging is too much chatter.

Hmm... I guess if payload is not a string at all because download
failed, then indeed we have other indications of the problem and
emitting a message would be redundant (and it's a normal occurrence
anyway), but is it really "normal business" for payload to be
a non-base64 string?  I thought this would indicate some really
unexpected circumstance.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
  2016-03-20 15:26       ` Stefan Monnier
@ 2016-03-20 15:40         ` Lars Magne Ingebrigtsen
  2016-03-20 16:12           ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2016-03-20 15:40 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Hmm... I guess if payload is not a string at all because download
> failed, then indeed we have other indications of the problem and
> emitting a message would be redundant (and it's a normal occurrence
> anyway), but is it really "normal business" for payload to be
> a non-base64 string?  I thought this would indicate some really
> unexpected circumstance.

The test case (encountered in the wild) was a base64 string, but it was
invalid.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
  2016-03-20 15:40         ` Lars Magne Ingebrigtsen
@ 2016-03-20 16:12           ` Stefan Monnier
  2016-03-20 16:41             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2016-03-20 16:12 UTC (permalink / raw
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

> The test case (encountered in the wild) was a base64 string, but it was
> invalid.

But is it something that's bound to happen every now and then, or is it
something very unusual that indicates a bug somewhere (could be on the
server side, tho)?


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images
  2016-03-20 16:12           ` Stefan Monnier
@ 2016-03-20 16:41             ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2016-03-20 16:41 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> But is it something that's bound to happen every now and then, or is it
> something very unusual that indicates a bug somewhere (could be on the
> server side, tho)?

It's bound to happen once in a while.  People edit HTML by hand etc.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-20 16:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20160320125720.21872.87876@vcs.savannah.gnu.org>
     [not found] ` <E1ahcv2-0005hP-Mn@vcs.savannah.gnu.org>
2016-03-20 13:47   ` [Emacs-diffs] master f2da80d: Ignore invalid base64 encoded embedded images Stefan Monnier
2016-03-20 13:49     ` Lars Magne Ingebrigtsen
2016-03-20 15:26       ` Stefan Monnier
2016-03-20 15:40         ` Lars Magne Ingebrigtsen
2016-03-20 16:12           ` Stefan Monnier
2016-03-20 16:41             ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.