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 f2da80d0e1)
Backport:
This commit is contained in:
@@ -924,7 +924,8 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
|
||||
(let ((param (match-string 4 data))
|
||||
(payload (url-unhex-string (match-string 5 data))))
|
||||
(when (string-match "^.*\\(;[ \t]*base64\\)$" param)
|
||||
(setq payload (base64-decode-string payload)))
|
||||
(setq payload (ignore-errors
|
||||
(base64-decode-string payload))))
|
||||
payload)))
|
||||
|
||||
;; Behind display-graphic-p test.
|
||||
|
||||
Reference in New Issue
Block a user