mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-28 19:42:02 +00:00
Avoid bugging out on multibyte SVG data in shr
* lisp/net/shr.el (svg--wrap-svg): Ensure that the SVG data is unibyte.
This commit is contained in:
parent
9b54d2b66e
commit
25f45d710e
@ -1199,7 +1199,9 @@ Return a string with image data."
|
||||
"<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:xi=\"http://www.w3.org/2001/XInclude\" style=\"color: %s;\" viewBox=\"0 0 %d %d\"> <xi:include href=\"data:image/svg+xml;base64,%s\"></xi:include></svg>"
|
||||
(face-foreground 'default)
|
||||
(car size) (cdr size)
|
||||
(base64-encode-string data t)))
|
||||
(base64-encode-string (encode-coding-string
|
||||
data (car (detect-coding-string data)))
|
||||
t)))
|
||||
(buffer-string))))
|
||||
|
||||
(defun shr-image-displayer (content-function)
|
||||
|
Loading…
Reference in New Issue
Block a user