bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30546: 27.0.50; shr: span tag with href attribute


From: Katsumi Yamaoka
Subject: bug#30546: 27.0.50; shr: span tag with href attribute
Date: Tue, 20 Feb 2018 18:52:37 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-unknown-cygwin)

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>

--- 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 via email to

[Prev in Thread] Current Thread [Next in Thread]