GNU bug report logs - #49344
shr: Add support for "data-src" attribute in <img> nodes

Previous Next

Package: emacs;

Reported by: 杨英超 <yangyingchao <at> gmail.com>

Date: Sat, 3 Jul 2021 00:58:02 UTC

Severity: normal

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.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 49344 in the body.
You can then email your comments to 49344 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#49344; Package emacs. (Sat, 03 Jul 2021 00:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 杨英超 <yangyingchao <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Jul 2021 00:58:02 GMT) Full text and rfc822 format available.

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

From: 杨英超 <yangyingchao <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: shr: Add support for "data-src" attribute in <img> nodes
Date: Sat, 3 Jul 2021 08:56:00 +0800
[Message part 1 (text/plain, inline)]
Dear maintainers:

I found eww fails to show card-images which is described in the following
web page:

https://www.geeksforgeeks.org/why-card-images-use-data-src-not-src-for-image-in-bootstrap-4/

For example, if you open following page with eww & firefox, you will notice
the differences:   http://www.interdb.jp/pg/pgsql05.html

I modified shr.el a little bit to support "data-src" attribute, so eww can
display card-images properly.

 Hope it helps.

Regards
yc
[Message part 2 (text/html, inline)]
[0001-Add-support-for-data-src-attribute-in-img-tag.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49344; Package emacs. (Sun, 04 Jul 2021 05:47:01 GMT) Full text and rfc822 format available.

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

From: Phil Sainty <psainty <at> orcon.net.nz>
To: 杨英超 <yangyingchao <at> gmail.com>
Cc: 49344 <at> debbugs.gnu.org
Subject: Re: bug#49344: shr: Add support for "data-src" attribute in <img>
 nodes
Date: Sun, 04 Jul 2021 17:46:43 +1200
On 2021-07-03 12:56, 杨英超 wrote:
> https://www.geeksforgeeks.org/why-card-images-use-data-src-not-src-for-image-in-bootstrap-4/

The meaning of any 'data-*' attribute is 100% application-defined.
I don't think that any web browsers should be assuming that a
'data-src' attribute is actually a 'src' attribute (that's not
any kind of standard AFAIK), nor implement workarounds for specific
web sites that are not generating sane HTML.

The initial markup should have a proper 'src' attribute.  If the
site wants the initial state to be different in the presence of
Javascript, then it should be using Javascript to modify the
initial state accordingly, following a progressive-enhancement
approach.

As eww doesn't support Javascript, this particular case is only
one of many things which won't work when the site developers
make bad assumptions about Javascript.  I would expect your
example to fail in any web browser where JS was disabled or
not supported.

E.g. for me, using Firefox, the site looks very similar in
Firefox and eww because I use the uMatrix extension to only
permit Javascript to run on sites where I have explicitly
allowed it.  (Actually, the site looks *better* in eww, because
their code blocks in Firefox are barely readable on account
of the appallingly poor contrast between background and text.)

This is simply bad web design, and I don't think that's eww's
problem to solve.


-Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49344; Package emacs. (Sun, 04 Jul 2021 13:56:00 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 杨英超 <yangyingchao <at> gmail.com>, 49344 <at> debbugs.gnu.org
Subject: Re: bug#49344: shr: Add support for "data-src" attribute in <img>
 nodes
Date: Sun, 04 Jul 2021 15:55:37 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

> This is simply bad web design, and I don't think that's eww's
> problem to solve.

Indeed, so I'm closing this bug report.

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




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 13:56:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 49344 <at> debbugs.gnu.org and 杨英超 <yangyingchao <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 13:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49344; Package emacs. (Mon, 05 Jul 2021 00:19:02 GMT) Full text and rfc822 format available.

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

From: 杨英超 <yangyingchao <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Phil Sainty <psainty <at> orcon.net.nz>, 49344 <at> debbugs.gnu.org
Subject: Re: bug#49344: shr: Add support for "data-src" attribute in <img>
 nodes
Date: Mon, 5 Jul 2021 08:16:52 +0800
[Message part 1 (text/plain, inline)]
At your wish, although I don't agree. I have my own fork I can play with.

Lars Ingebrigtsen <larsi <at> gnus.org> 于2021年7月4日周日 下午9:55写道:

> Phil Sainty <psainty <at> orcon.net.nz> writes:
>
> > This is simply bad web design, and I don't think that's eww's
> > problem to solve.
>
> Indeed, so I'm closing this bug report.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 02 Aug 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 240 days ago.

Previous Next


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