emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 310112f: Fix eww-follow-link on URLs with #target


From: Basil L. Contovounesios
Subject: emacs-27 310112f: Fix eww-follow-link on URLs with #target
Date: Sun, 3 May 2020 19:45:15 -0400 (EDT)

branch: emacs-27
commit 310112fdc7448a9297085333fcd4bf4088e634bf
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    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).
---
 lisp/net/eww.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 811d7c6..568b96f 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



reply via email to

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