(eww-follow-link): Make going to #targets in the page work again.

parent 6fd82d61
......@@ -6,6 +6,7 @@
(eww-display-html): Don't pop the *eww* buffer.
(eww-display-raw): Ditto.
(eww-display-image): Ditto.
(eww-follow-link): Make going to #targets in the page work again.
2014-11-23 Ivan Shmakov <ivan@siamics.net>
......
......@@ -359,7 +359,9 @@ See the `eww-search-prefix' variable for the search engine used."
(list
'base (list (cons 'href url))
(progn
(unless (eq charset encode)
(when (or (and encode
(not (eq charset encode)))
(not (eq charset 'utf-8)))
(condition-case nil
(decode-coding-region (point) (point-max)
(or encode charset))
......@@ -1319,9 +1321,9 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
;; This is a #target url in the same page as the current one.
((and (url-target (url-generic-parse-url url))
(eww-same-page-p url (plist-get eww-data :url)))
(eww-save-history)
(eww-display-html 'utf-8 url (plist-get eww-data :url)
nil (current-buffer)))
(let ((dom (plist-get eww-data :dom)))
(eww-save-history)
(eww-display-html 'utf-8 url dom nil (current-buffer))))
(t
(eww-browse-url url)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment