|
@@ -344,17 +344,14 @@ func handleProcessing(reqID string, rw http.ResponseWriter, r *http.Request) {
|
|
// Don't process SVG
|
|
// Don't process SVG
|
|
if originData.Type == imagetype.SVG {
|
|
if originData.Type == imagetype.SVG {
|
|
if config.SanitizeSvg {
|
|
if config.SanitizeSvg {
|
|
- sanitized, svgErr := svg.Satitize(originData.Data)
|
|
|
|
|
|
+ sanitized, svgErr := svg.Satitize(originData)
|
|
checkErr(ctx, "svg_processing", svgErr)
|
|
checkErr(ctx, "svg_processing", svgErr)
|
|
|
|
|
|
// Since we'll replace origin data, it's better to close it to return
|
|
// Since we'll replace origin data, it's better to close it to return
|
|
// it's buffer to the pool
|
|
// it's buffer to the pool
|
|
originData.Close()
|
|
originData.Close()
|
|
|
|
|
|
- originData = &imagedata.ImageData{
|
|
|
|
- Data: sanitized,
|
|
|
|
- Type: imagetype.SVG,
|
|
|
|
- }
|
|
|
|
|
|
+ originData = sanitized
|
|
}
|
|
}
|
|
|
|
|
|
respondWithImage(reqID, r, rw, statusCode, originData, po, imageURL, originData)
|
|
respondWithImage(reqID, r, rw, statusCode, originData, po, imageURL, originData)
|