From: Grégoire Jadi Date: Mon, 24 Jul 2017 15:29:28 +0000 (+0200) Subject: Ensure that we parse images right in shr.el X-Git-Tag: emacs-26.0.90~518^2~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe25d0ce8e8b44c3e2ce84ac470822a299199445;p=emacs.git 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. --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 2f73f982af9..fe93fc32ad3 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -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)))