1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00

Use strings.Builder instead of bytes.Buffer in feDropShadow fix

This commit is contained in:
DarthSim 2022-10-17 12:14:03 +06:00
parent 4ab415fd9b
commit 296d2db8cf

View File

@ -81,11 +81,13 @@ func Satitize(data *imagedata.ImageData) (*imagedata.ImageData, error) {
}
func replaceDropShadowNode(l *xml.Lexer, buf *bytes.Buffer) error {
inAttrs := new(bytes.Buffer)
blurAttrs := new(bytes.Buffer)
offsetAttrs := new(bytes.Buffer)
floodAttrs := new(bytes.Buffer)
finalAttrs := new(bytes.Buffer)
var (
inAttrs strings.Builder
blurAttrs strings.Builder
offsetAttrs strings.Builder
floodAttrs strings.Builder
finalAttrs strings.Builder
)
inID, _ := nanoid.New(8)
offsetID, _ := nanoid.New(8)