summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2023-06-23 09:00:56 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2023-06-23 09:00:56 -0700
commit54561e9a6667b36a8452b01d2def9e3642013dd6 (patch)
tree4e6e1d6fbb0b455b9cb211e6cc7bc8d764f312b4 /src/Text
parent7b8b8f802da77ce0d8e473124801e27e2e87362f (diff)
Fix bug in 5e381e3878b5da87ee7542f7e51c3c1a7fd84b89
In the new code a comma mysteriously turned into a period. This would have prevented proper separation of the mime type and content in data uris. Thanks to @hseg for catching this.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Class/IO.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class/IO.hs b/src/Text/Pandoc/Class/IO.hs
index 9f3033d1f..91e1dc625 100644
--- a/src/Text/Pandoc/Class/IO.hs
+++ b/src/Text/Pandoc/Class/IO.hs
@@ -124,7 +124,7 @@ openURL :: (PandocMonad m, MonadIO m) => Text -> m (B.ByteString, Maybe MimeType
openURL u
| Just (URI{ uriScheme = "data:",
uriPath = upath }) <- parseURI (T.unpack u) = do
- let (mime, rest) = break (== '.') upath
+ let (mime, rest) = break (== ',') upath
let contents = UTF8.fromString $ drop 1 rest
return (decodeBase64Lenient contents, Just (T.pack mime))
| otherwise = do