Skip to content

Commit

Permalink
cope with odd svg content-types (#3173)
Browse files Browse the repository at this point in the history
Fixes #3072
  • Loading branch information
peterbe authored Mar 10, 2021
1 parent df5adfa commit 0fd3272
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/flaws.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,9 @@ async function fixFixableFlaws(doc, options, document) {
if (
!fileType &&
flaw.src.toLowerCase().endsWith(".svg") &&
imageResponse.headers["content-type"] === "image/svg+xml"
imageResponse.headers["content-type"]
.toLowerCase()
.startsWith("image/svg+xml")
) {
// If the SVG doesn't have the `<?xml version="1.0" encoding="UTF-8"?>`
// and/or the `<!DOCTYPE svg PUBLIC ...` in the first couple of bytes
Expand Down

0 comments on commit 0fd3272

Please sign in to comment.