aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-09 13:51:45 +1100
committerLars Ingebrigtsen2016-02-09 13:52:27 +1100
commit9935e7cc8ca61bc0852eefe1142e4c8c62416c73 (patch)
tree4709ad398bdd37210b7e1ee63e587869c180a058
parent821213572075b3f5a97676f48aeb6733bf437277 (diff)
downloademacs-9935e7cc8ca61bc0852eefe1142e4c8c62416c73.tar.gz
emacs-9935e7cc8ca61bc0852eefe1142e4c8c62416c73.zip
Make the `R' command get the correct relative <img>s
* lisp/net/eww.el (eww-readable): Preserve the base URL so that image expansions are fetched from the right place (bug#22605). (cherry picked from commit 8722e849f75ceafb82a1c17105e8ab76077a8ebc) Backport:
-rw-r--r--lisp/net/eww.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 5e24d4fef4e..da920c14aec 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -615,11 +615,13 @@ the like."
615 (condition-case nil 615 (condition-case nil
616 (decode-coding-region (point-min) (point-max) 'utf-8) 616 (decode-coding-region (point-min) (point-max) 'utf-8)
617 (coding-system-error nil)) 617 (coding-system-error nil))
618 (libxml-parse-html-region (point-min) (point-max))))) 618 (libxml-parse-html-region (point-min) (point-max))))
619 (base (plist-get eww-data :url)))
619 (eww-score-readability dom) 620 (eww-score-readability dom)
620 (eww-save-history) 621 (eww-save-history)
621 (eww-display-html nil nil 622 (eww-display-html nil nil
622 (eww-highest-readability dom) 623 (list 'base (list (cons 'href base))
624 (eww-highest-readability dom))
623 nil (current-buffer)) 625 nil (current-buffer))
624 (dolist (elem '(:source :url :title :next :previous :up)) 626 (dolist (elem '(:source :url :title :next :previous :up))
625 (plist-put eww-data elem (plist-get old-data elem))) 627 (plist-put eww-data elem (plist-get old-data elem)))