aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Shared.hs3
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