From: Greg Farough <gregf@gnu.org>
To: 51525@debbugs.gnu.org
Subject: bug#51525: 27.2; shr.el fails to render <abbr> tags missing a title attribute
Date: Sun, 31 Oct 2021 00:12:27 -0400 [thread overview]
Message-ID: <87pmrl25p0.fsf@gnu.org> (raw)
It looks like shr.el will skip over rendering HTML <abbr> tags that
are missing the "title" attribute. It seems a little strange to me,
but according to MDN[1] that attribute is optional, and examples of it
being omitted can be found out in the wild.
To verify this, you can use eww.el to open this test page[2] I've
written on Emacs 27.2 or the master branch. The first paragraph
contains an <abbr> tag with a title attribute, and the second one
contains an <abbr> tag that does not.
As a bonus, I have a real world and holiday-appropriate example[3] from
Bram Stoker's Dracula. Search for "welcome," and you should see this:
"I am Dracula; and I bid you welcome, Harker, to my house."
The extra space before Harker is due to "Mr." being enclosed in an
<abbr> tag that has no title attribute.
Not a major bug by any means, but I thought I'd let you all know. Thanks
very much.
-g
[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr
[2]: https://gregf.beevomit.org/abbr.html
[3]: https://standardebooks.org/ebooks/bram-stoker/dracula/text/chapter-2
In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure
CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
--prefix=/gnu/store/ymvcv4shwva26r3k9mxh5d38hsbrygpb-emacs-27.2
--enable-fast-install --with-modules --with-cairo
--disable-build-details'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER
GMP
Important settings:
value of $EMACSLOADPATH: /gnu/store/vdxz1c1s2cmy4qynj8vmz8nvpwvl31w0-profile/share/emacs/site-lisp:/gnu/store/ymvcv4shwva26r3k9mxh5d38hsbrygpb-emacs-27.2/share/emacs/27.2/lisp
locale-coding-system: nil
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
disp-table tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 43402 10579)
(symbols 48 6002 1)
(strings 32 15181 1838)
(string-bytes 1 505260)
(vectors 16 6786)
(vector-slots 8 75937 8440)
(floats 8 17 345)
(intervals 56 199 201)
(buffers 1000 11))
--
"We carry a new world here, in our hearts. That world is growing in
this minute."
next reply other threads:[~2021-10-31 4:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-31 4:12 Greg Farough [this message]
2021-10-31 15:21 ` bug#51525: 27.2; shr.el fails to render <abbr> tags missing a title attribute Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmrl25p0.fsf@gnu.org \
--to=gregf@gnu.org \
--cc=51525@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.