Fix SVG detection when the root element has a namespace

This commit is contained in:
DarthSim
2024-05-07 18:58:47 +03:00
parent 9c8293a2a0
commit a23737a90b
2 changed files with 3 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
### Fix
- Fix HEIC/AVIF dimension limit handling.
- Fix SVG detection when the root element has a namespace.
- (pro) Fix style injection to SVG.
## [3.24.1] - 2024-04-30

View File

@@ -23,7 +23,8 @@ func IsSVG(r io.Reader) bool {
return false
case xml.StartTagToken:
return strings.ToLower(string(l.Text())) == "svg"
tag := strings.ToLower(string(l.Text()))
return tag == "svg" || tag == "svg:svg"
}
}
}