Decompress .svgz when converting to "data:" URI

Address #5163
This commit is contained in:
Alexander Krotov 2018-12-18 11:47:26 +03:00
parent 595e954c9b
commit fd0f041a13

View file

@ -250,7 +250,7 @@ getData _ src@('d':'a':'t':'a':':':_) = return $ Left src-- already data: uri
getData mimetype src = do
let ext = map toLower $ takeExtension src
(raw, respMime) <- fetchItem src
let raw' = if ext == ".gz"
let raw' = if ext `elem` [".gz", ".svgz"]
then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks [raw]
else raw
mime <- case (mimetype, respMime) of