@@ -7,6 +7,7 @@
- (pro) Add [gradient](https://docs.imgproxy.net/latest/generating_the_url?id=gradient) processing option.
### Fix
+- Fix false-positive SVG detections.
- (pro) Fix saving of GIF with variable frame delay to MP4.
## [3.9.0] - 2022-10-19
@@ -20,12 +20,13 @@ func IsSVG(r io.Reader) (bool, error) {
switch tt {
case xml.ErrorToken:
+ if err := l.Err(); err != io.EOF {
+ return false, err
+ }
return false, nil
case xml.StartTagToken:
- if strings.ToLower(string(l.Text())) == "svg" {
- return true, nil
- }
+ return strings.ToLower(string(l.Text())) == "svg", nil
}