aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrégoire Jadi2017-07-24 17:29:28 +0200
committerLars Ingebrigtsen2017-07-24 17:29:28 +0200
commitfe25d0ce8e8b44c3e2ce84ac470822a299199445 (patch)
tree903b556b8d8f6b51d6af3f3409be80e528b1ac2e
parent6dc5d45c542a6f9cfbcf3e37d597c9e0efb3070d (diff)
downloademacs-fe25d0ce8e8b44c3e2ce84ac470822a299199445.tar.gz
emacs-fe25d0ce8e8b44c3e2ce84ac470822a299199445.zip
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.
-rw-r--r--lisp/net/shr.el1
1 files changed, 1 insertions, 0 deletions
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'."
945 (when (and (buffer-name buffer) 945 (when (and (buffer-name buffer)
946 (not (plist-get status :error))) 946 (not (plist-get status :error)))
947 (url-store-in-cache image-buffer) 947 (url-store-in-cache image-buffer)
948 (goto-char (point-min))
948 (when (or (search-forward "\n\n" nil t) 949 (when (or (search-forward "\n\n" nil t)
949 (search-forward "\r\n\r\n" nil t)) 950 (search-forward "\r\n\r\n" nil t))
950 (let ((data (shr-parse-image-data))) 951 (let ((data (shr-parse-image-data)))