diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-08-22 23:21:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-08-22 23:21:57 -0700 |
commit | 2956ef251c815c332679ff4666031a5b7a65aadc (patch) | |
tree | bfe56291d20fedc2f26489feb2c43057c26efbfd | |
parent | 17f71002ae099fe1bbd4ffda4a979bb6c5bab9e1 (diff) | |
download | pandoc-2956ef251c815c332679ff4666031a5b7a65aadc.tar.gz |
Fixed --self-contained with Windows paths.
Previously C:\foo.js was being wrongly interpreted as a URI.
Closes #1558.
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 3adf2a1f6..1f89224ff 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -796,7 +796,8 @@ fetchItem sourceURL s = mime = case takeExtension fp of ".gz" -> getMimeType $ dropExtension fp x -> getMimeType x - ensureEscaped = escapeURIString isAllowedInURI + ensureEscaped x@(_:':':'\\':_) = x -- likely windows path + ensureEscaped x = escapeURIString isAllowedInURI x -- | Like 'fetchItem', but also looks for items in a 'MediaBag'. fetchItem' :: MediaBag -> Maybe String -> String |