unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: 30546@debbugs.gnu.org
Cc: jidanni@jidanni.org
Subject: bug#30546: 27.0.50; shr: span tag with href attribute
Date: Tue, 20 Feb 2018 18:52:37 +0900	[thread overview]
Message-ID: <b4msh9w0yze.fsf@jpl.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

Hi,

Though it is not necessarily a bug[1], Firefox renders this as
a link but shr doesn't:

<span href="https://www.example.com" style="font-size:...">Foo</span>

Jidanni wrote me that some html mails he receives contain such
forms, and I tried making shr support it as the patch attached
below.  I'm not quite sure whether it causes a trouble but I'm
going to try it for some time.

Thanks.

[1] <https://stackoverflow.com/questions/46889226/is-a-span-tag-with-a-href-attribute-considered-valid>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 260 bytes --]

--- shr.el~	2018-01-15 21:54:49.635451500 +0000
+++ shr.el	2018-02-20 09:47:39.198990800 +0000
@@ -1751,3 +1751,5 @@
 (defun shr-tag-span (dom)
-  (shr-generic dom))
+  (if (dom-attr dom 'href)
+      (shr-tag-a (cons 'a (cdr dom)))
+    (shr-generic dom)))
 

             reply	other threads:[~2018-02-20  9:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20  9:52 Katsumi Yamaoka [this message]
2018-02-20 11:10 ` bug#30546: 27.0.50; shr: span tag with href attribute Lars Ingebrigtsen
2018-02-20 22:53   ` Katsumi Yamaoka
2018-02-21  8:56     ` Lars Ingebrigtsen
2018-02-21  9:21       ` Katsumi Yamaoka
2018-02-21  9:02     ` Lars Ingebrigtsen
2018-02-21  9:24       ` Katsumi Yamaoka
2018-02-22  0:32         ` 積丹尼 Dan Jacobson

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4msh9w0yze.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=30546@debbugs.gnu.org \
    --cc=jidanni@jidanni.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).