diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-04-19 11:35:26 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-04-19 11:35:26 -0700 |
commit | b87dd19816f193e895dfc403a8b5a860d0e48d7d (patch) | |
tree | 7e4b29661382a302f309d3d21796b6cc3190ce8c /src/Text/Pandoc/Readers | |
parent | caeb963447440edb14a67bb02cb6c956232dce63 (diff) | |
download | pandoc-b87dd19816f193e895dfc403a8b5a860d0e48d7d.tar.gz |
EPUB reader: fix images with space in file path.
Closes #4344.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/EPUB.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs index 714468a8a..5c92c188b 100644 --- a/src/Text/Pandoc/Readers/EPUB.hs +++ b/src/Text/Pandoc/Readers/EPUB.hs @@ -93,7 +93,7 @@ fetchImages mimes root arc (query iq -> links) = mapM_ (uncurry3 insertMedia) (mapMaybe getEntry links) where getEntry link = - let abslink = normalise (root </> link) in + let abslink = normalise (unEscapeString (root </> link)) in (link , lookup link mimes, ) . fromEntry <$> findEntryByPath abslink arc @@ -264,7 +264,7 @@ findAttrE :: PandocMonad m => QName -> Element -> m String findAttrE q e = mkE "findAttr" $ findAttr q e findEntryByPathE :: PandocMonad m => FilePath -> Archive -> m Entry -findEntryByPathE (normalise -> path) a = +findEntryByPathE (normalise . unEscapeString -> path) a = mkE ("No entry on path: " ++ path) $ findEntryByPath path a parseXMLDocE :: PandocMonad m => String -> m Element |