[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fa41693 3/3: Make #anchors work again in eww
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master fa41693 3/3: Make #anchors work again in eww |
Date: |
Fri, 13 Apr 2018 08:57:49 -0400 (EDT) |
branch: master
commit fa416937997a113d84ab4e4910d730ce5d77613d
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make #anchors work again in eww
* lisp/net/eww.el (eww-render): When we have a #link link, then
url.el will say that we have a redirect to a non-#link link, so
get the anchor before url.el mangles the URL (bug#28441).
(eww-display-html): ... and don't get it here, because it's gone
by now.
Test URL: http://www.gnu.org/s/hyperbole/#summary
---
lisp/net/eww.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 08a40ce..6b7fa05 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -349,9 +349,6 @@ Currently this means either text/html or
application/xhtml+xml."
"application/xhtml+xml")))
(defun eww-render (status url &optional point buffer encode)
- (let ((redirect (plist-get status :redirect)))
- (when redirect
- (setq url redirect)))
(let* ((headers (eww-parse-headers))
(content-type
(mail-header-parse-content-type
@@ -364,7 +361,11 @@ Currently this means either text/html or
application/xhtml+xml."
(eww-detect-charset (eww-html-p (car content-type)))
"utf-8"))))
(data-buffer (current-buffer))
+ (shr-target-id (url-target (url-generic-parse-url url)))
last-coding-system-used)
+ (let ((redirect (plist-get status :redirect)))
+ (when redirect
+ (setq url redirect)))
(with-current-buffer buffer
;; Save the https peer status.
(plist-put eww-data :peer (plist-get status :peer))
@@ -460,7 +461,6 @@ 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)
- (shr-target-id (url-target (url-generic-parse-url url)))
(shr-external-rendering-functions
(append
shr-external-rendering-functions