GNU bug report logs -
#57796
29.0.50; textsec-link-suspicious-p is unaware of eww-url-transformers
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Wed, 14 Sep 2022 07:42:01 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 57796 <at> debbugs.gnu.org (full text, mbox):
[புதன் செப்டம்பர் 14, 2022] Visuwesh wrote:
> Upon digging this issue further, I see the problem is with shr-tag-a,
> not textsec-link-suspicious-p. Sorry for the misleading bug title---I'm
> not sure what the right way to rename the title is.
Looks like eww uses a custom tag function for <a></a>. I tried the
following patch but I cannot figure out how to turn `href' into a full
URL.
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 6ed0719eca..de4a06dc47 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -781,9 +781,13 @@ eww-tag-link
(defun eww-tag-a (dom)
(eww-handle-link dom)
- (let ((start (point)))
+ (let ((start (point))
+ (href (dom-attr dom 'href)))
+ (when href
+ (setq href (eww--transform-url (shr-expand-url href)))
+ (dom-set-attribute dom 'href href))
(shr-tag-a dom)
- (if (dom-attr dom 'href)
+ (if href
(put-text-property start (point)
'keymap
(if (mm-images-in-region-p start (point))
This bug report was last modified 2 years and 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.