From: Basil L. Contovounesios Date: Wed, 22 Apr 2020 10:42:17 +0000 (+0100) Subject: Fix eww-follow-link on URLs with #target X-Git-Tag: emacs-27.1-rc1~157 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=310112fdc7448a9297085333fcd4bf4088e634bf;p=emacs.git Fix eww-follow-link on URLs with #target * lisp/net/eww.el (eww-display-html): Ensure shr-target-id is set as callers depend on this (bug#28441, bug#40532). --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 811d7c69209..568b96f4d58 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -518,6 +518,10 @@ Currently this means either text/html or application/xhtml+xml." (plist-put eww-data :dom document) (let ((inhibit-read-only t) (inhibit-modification-hooks t) + ;; Possibly set by the caller, e.g., `eww-render' which + ;; preserves the old URL #target before chasing redirects. + (shr-target-id (or shr-target-id + (url-target (url-generic-parse-url url)))) (shr-external-rendering-functions (append shr-external-rendering-functions