diff options
| author | Lars Magne Ingebrigtsen | 2016-03-20 13:57:11 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2016-03-20 13:57:11 +0100 |
| commit | f2da80d0e1ccd121c4891e869a45aeb9c6b1795d (patch) | |
| tree | 2357ccd71314674f33b0eb74696f9be532ba7870 | |
| parent | 4f6ea3988b66cf132c67fd0cc26d12eb9a300ba1 (diff) | |
| download | emacs-f2da80d0e1ccd121c4891e869a45aeb9c6b1795d.tar.gz emacs-f2da80d0e1ccd121c4891e869a45aeb9c6b1795d.zip | |
Ignore invalid base64 encoded embedded images
* lisp/net/shr.el (shr-image-from-data): Ignore invalid base64
encoded embedded images (bug#22928).
| -rw-r--r-- | lisp/net/shr.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 4f64618c008..cd55f223cf6 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -946,7 +946,8 @@ If EXTERNAL, browse the URL using `shr-external-browser'." | |||
| 946 | (let ((param (match-string 4 data)) | 946 | (let ((param (match-string 4 data)) |
| 947 | (payload (url-unhex-string (match-string 5 data)))) | 947 | (payload (url-unhex-string (match-string 5 data)))) |
| 948 | (when (string-match "^.*\\(;[ \t]*base64\\)$" param) | 948 | (when (string-match "^.*\\(;[ \t]*base64\\)$" param) |
| 949 | (setq payload (base64-decode-string payload))) | 949 | (setq payload (ignore-errors |
| 950 | (base64-decode-string payload)))) | ||
| 950 | payload))) | 951 | payload))) |
| 951 | 952 | ||
| 952 | ;; Behind display-graphic-p test. | 953 | ;; Behind display-graphic-p test. |