1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

Ensure that we parse images right in shr.el

* lisp/net/shr.el (shr-image-fetched): Go back to the
beginning of the buffer before trying to parse the image
fetched.
This commit is contained in:
Grégoire Jadi 2017-07-24 17:29:28 +02:00 committed by Lars Ingebrigtsen
parent 6dc5d45c54
commit fe25d0ce8e

View File

@ -945,6 +945,7 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
(when (and (buffer-name buffer)
(not (plist-get status :error)))
(url-store-in-cache image-buffer)
(goto-char (point-min))
(when (or (search-forward "\n\n" nil t)
(search-forward "\r\n\r\n" nil t))
(let ((data (shr-parse-image-data)))