Unwrap unnecessary bytes.NewReader
This commit is contained in:
parent
a90d29700d
commit
69519d8fa4
@ -1011,11 +1011,7 @@ func (s *Server) getHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
|
||||
if disposition == "inline" && strings.Contains(contentType, "html") {
|
||||
reader = ioutil.NopCloser(
|
||||
bytes.NewReader(
|
||||
bluemonday.UGCPolicy().
|
||||
SanitizeReader(reader).
|
||||
Bytes()))
|
||||
reader = ioutil.NopCloser(bluemonday.UGCPolicy().SanitizeReader(reader))
|
||||
}
|
||||
|
||||
if w.Header().Get("Range") == "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user