diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-04-19 11:39:35 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-04-19 11:39:35 -0700 |
commit | b15f4f468dd9d50c60eeea982048730200a2858b (patch) | |
tree | f8464fff56471c4c94fc665d7deae58d50c3fb45 /src | |
parent | b87dd19816f193e895dfc403a8b5a860d0e48d7d (diff) | |
download | pandoc-b15f4f468dd9d50c60eeea982048730200a2858b.tar.gz |
Text.Pandoc.Class.writeMedia: unescape URI-escaping in file path.
This avoids writing things like `file%20one.png` to the file system.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Class.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs index c78822ee9..3529054e6 100644 --- a/src/Text/Pandoc/Class.hs +++ b/src/Text/Pandoc/Class.hs @@ -855,7 +855,7 @@ writeMedia :: FilePath -> MediaBag -> FilePath -> PandocIO () writeMedia dir mediabag subpath = do -- we join and split to convert a/b/c to a\b\c on Windows; -- in zip containers all paths use / - let fullpath = dir </> normalise subpath + let fullpath = dir </> unEscapeString (normalise subpath) let mbcontents = lookupMedia subpath mediabag case mbcontents of Nothing -> throwError $ PandocResourceNotFound subpath |