diff options
| author | Lars Magne Ingebrigtsen | 2016-03-20 13:57:11 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2016-03-20 13:58:04 +0100 |
| commit | d8b2ce5f8a6a849e55b48699dfa0e769a4b9a3f6 (patch) | |
| tree | c9530e1c46be4f7b0ab7602235ede44ac4ba31c0 | |
| parent | 52ba24bdd913f6be8318c34b281c7ad727dee6ad (diff) | |
| download | emacs-d8b2ce5f8a6a849e55b48699dfa0e769a4b9a3f6.tar.gz emacs-d8b2ce5f8a6a849e55b48699dfa0e769a4b9a3f6.zip | |
Ignore invalid base64 encoded embedded images
* lisp/net/shr.el (shr-image-from-data): Ignore invalid base64
encoded embedded images (bug#22928).
(cherry picked from commit f2da80d0e1ccd121c4891e869a45aeb9c6b1795d)
Backport:
| -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 900b8ec3f5c..07fcbebce08 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -924,7 +924,8 @@ If EXTERNAL, browse the URL using `shr-external-browser'." | |||
| 924 | (let ((param (match-string 4 data)) | 924 | (let ((param (match-string 4 data)) |
| 925 | (payload (url-unhex-string (match-string 5 data)))) | 925 | (payload (url-unhex-string (match-string 5 data)))) |
| 926 | (when (string-match "^.*\\(;[ \t]*base64\\)$" param) | 926 | (when (string-match "^.*\\(;[ \t]*base64\\)$" param) |
| 927 | (setq payload (base64-decode-string payload))) | 927 | (setq payload (ignore-errors |
| 928 | (base64-decode-string payload)))) | ||
| 928 | payload))) | 929 | payload))) |
| 929 | 930 | ||
| 930 | ;; Behind display-graphic-p test. | 931 | ;; Behind display-graphic-p test. |