mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-22 04:47:34 +00:00
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
This commit is contained in:
parent
0a71996423
commit
fa41693799
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue