diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/MIME.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/MIME.hs b/src/Text/Pandoc/MIME.hs index 27f7e3414..6fd9ac373 100644 --- a/src/Text/Pandoc/MIME.hs +++ b/src/Text/Pandoc/MIME.hs @@ -433,7 +433,9 @@ mimeTypesList = -- List borrowed from happstack-server. ,("sv4cpio","application/x-sv4cpio") ,("sv4crc","application/x-sv4crc") ,("svg","image/svg+xml") - ,("svgz","image/svg+xml") + -- removed for now, since it causes problems with + -- extensionFromMimeType: see #2183. + -- ,("svgz","image/svg+xml") ,("sw","chemical/x-swissprot") ,("swf","application/x-shockwave-flash") ,("swfl","application/x-shockwave-flash") diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 016cb4b65..362db2fed 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -796,6 +796,7 @@ fetchItem sourceURL s = fp = unEscapeString $ dropFragmentAndQuery s mime = case takeExtension fp of ".gz" -> getMimeType $ dropExtension fp + ".svgz" -> getMimeType $ dropExtension fp ++ ".svg" x -> getMimeType x ensureEscaped x@(_:':':'\\':_) = x -- likely windows path ensureEscaped x = escapeURIString isAllowedInURI x |