1
0
Эх сурвалжийг харах

Escape quotes in content disposition

DarthSim 3 жил өмнө
parent
commit
2ae2a539fe

+ 1 - 1
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 {