Base64 encode SVG's too, to avoid things like '%' breaking.
This commit is contained in:
parent
8abdbb6683
commit
c64a8e7a63
@ -25,5 +25,5 @@ func ImageToPayload(i image.Image) string {
|
|||||||
// SVGToPayload create the string necessary to send an SVG
|
// SVGToPayload create the string necessary to send an SVG
|
||||||
// via a ESSetImage struct
|
// via a ESSetImage struct
|
||||||
func SVGToPayload(svg string) string {
|
func SVGToPayload(svg string) string {
|
||||||
return "data:image/svg+xml;charset=utf8," + svg
|
return "data:image/svg+xml;charset=utf8;base64," + base64.StdEncoding.EncodeToString([]byte(svg))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user