]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix eww-follow-link on URLs with #target
authorBasil L. Contovounesios <contovob@tcd.ie>
Wed, 22 Apr 2020 10:42:17 +0000 (11:42 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Sun, 3 May 2020 23:40:38 +0000 (00:40 +0100)
* 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

index 811d7c692091b2f849c2dcff979b480fd4b591f6..568b96f4d58e4f56cc849789504122e3f9d1fa8e 100644 (file)
@@ -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