]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure that we parse images right in shr.el
authorGrégoire Jadi <gjadi@omecha.info>
Mon, 24 Jul 2017 15:29:28 +0000 (17:29 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Jul 2017 15:29:28 +0000 (17:29 +0200)
* lisp/net/shr.el (shr-image-fetched): Go back to the
beginning of the buffer before trying to parse the image
fetched.

lisp/net/shr.el

index 2f73f982af9d8b93258da1d1aac55060e8b74443..fe93fc32ad32c9b4bea779d789f2e021a86a7175 100644 (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)))