mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Replace quotes only, instead of using strconv.Quote
This commit is contained in:
parent
12c8373f93
commit
d954d709e2
|
|
@ -309,7 +309,7 @@ func (r *downloadRequest) respondFromLocalFile(
|
|||
}
|
||||
w.Header().Set("Content-Disposition", fmt.Sprintf(
|
||||
`inline; filename=utf-8"%s"`,
|
||||
strconv.Quote(uploadName),
|
||||
strings.ReplaceAll(uploadName, `"`, `\"`), // escape quote marks only, as per RFC6266
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue