diff options
| author | Lars Ingebrigtsen | 2016-02-09 13:51:45 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-09 13:51:45 +1100 |
| commit | 8722e849f75ceafb82a1c17105e8ab76077a8ebc (patch) | |
| tree | a58320f04d7423a734d92bd6e6c587e8d5cac7d9 | |
| parent | 54b198af77449135980ce36fcfb42a5eea18c5c4 (diff) | |
| download | emacs-8722e849f75ceafb82a1c17105e8ab76077a8ebc.tar.gz emacs-8722e849f75ceafb82a1c17105e8ab76077a8ebc.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).
| -rw-r--r-- | lisp/net/eww.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 6a5fb4bdcf0..fdac46483c7 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -625,11 +625,13 @@ the like." | |||
| 625 | (condition-case nil | 625 | (condition-case nil |
| 626 | (decode-coding-region (point-min) (point-max) 'utf-8) | 626 | (decode-coding-region (point-min) (point-max) 'utf-8) |
| 627 | (coding-system-error nil)) | 627 | (coding-system-error nil)) |
| 628 | (libxml-parse-html-region (point-min) (point-max))))) | 628 | (libxml-parse-html-region (point-min) (point-max)))) |
| 629 | (base (plist-get eww-data :url))) | ||
| 629 | (eww-score-readability dom) | 630 | (eww-score-readability dom) |
| 630 | (eww-save-history) | 631 | (eww-save-history) |
| 631 | (eww-display-html nil nil | 632 | (eww-display-html nil nil |
| 632 | (eww-highest-readability dom) | 633 | (list 'base (list (cons 'href base)) |
| 634 | (eww-highest-readability dom)) | ||
| 633 | nil (current-buffer)) | 635 | nil (current-buffer)) |
| 634 | (dolist (elem '(:source :url :title :next :previous :up)) | 636 | (dolist (elem '(:source :url :title :next :previous :up)) |
| 635 | (plist-put eww-data elem (plist-get old-data elem))) | 637 | (plist-put eww-data elem (plist-get old-data elem))) |