From 2ae2a539fe4d3eef6b88c2232dfdc211278f1865 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Tue, 23 Nov 2021 13:32:42 +0600 Subject: [PATCH] Escape quotes in content disposition --- imagetype/imagetype.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagetype/imagetype.go b/imagetype/imagetype.go index df932fac..56f1168d 100644 --- a/imagetype/imagetype.go +++ b/imagetype/imagetype.go @@ -99,7 +99,7 @@ func (it Type) ContentDisposition(filename string) string { return "inline" } - return fmt.Sprintf(format, filename) + return fmt.Sprintf(format, strings.ReplaceAll(filename, `"`, "%22")) } func (it Type) ContentDispositionFromURL(imageURL string) string {