diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-03-22 11:22:21 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-03-22 11:22:21 -0700 |
commit | 97acf152e06a8371327204f7f18b0dee726539d4 (patch) | |
tree | 2b8bb1286d0530b0c3e31e51ec19689ea1450f1d /src/Text/Pandoc | |
parent | b3473df417a760bb3fc10ee71c76a834c4c05214 (diff) | |
download | pandoc-97acf152e06a8371327204f7f18b0dee726539d4.tar.gz |
fetchItem: don't treat UNC paths as protocol-relative URLs.
These are paths beginning `//?/UNC/...`. Closes #5127.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Class.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs index dd0e35deb..9a3f2aa65 100644 --- a/src/Text/Pandoc/Class.hs +++ b/src/Text/Pandoc/Class.hs @@ -569,7 +569,8 @@ downloadOrRead s = do case parseURIReference' s' of Just u' -> openURL $ show $ u' `nonStrictRelativeTo` u Nothing -> openURL s' -- will throw error - (Nothing, s'@('/':'/':_)) -> -- protocol-relative URI + (Nothing, s'@('/':'/':c:_)) | c /= '?' -> -- protocol-relative URI + -- we exclude //? because of //?UNC/ on Windows case parseURIReference' s' of Just u' -> openURL $ show $ u' `nonStrictRelativeTo` httpcolon Nothing -> openURL s' -- will throw error |