From 2956ef251c815c332679ff4666031a5b7a65aadc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 22 Aug 2014 23:21:57 -0700 Subject: Fixed --self-contained with Windows paths. Previously C:\foo.js was being wrongly interpreted as a URI. Closes #1558. --- src/Text/Pandoc/Shared.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Shared.hs') 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 -- cgit v1.2.3