aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorTodd Sifleet <todd.sifleet@gmail.com>2014-10-28 18:45:36 -0700
committerTodd Sifleet <todd.sifleet@gmail.com>2014-10-28 18:45:36 -0700
commit8ad321d0d49964ec295d1d62d35ce3157b2bc9d0 (patch)
tree22c1804d9f397c2b70e0b00b2fd8494775455c98 /src/Text/Pandoc/Writers
parent93b82e8ea6a6ea3263a54b7d2a78e910323505b8 (diff)
downloadpandoc-8ad321d0d49964ec295d1d62d35ce3157b2bc9d0.tar.gz
Strip querystring in ODT write
* Resolve #1682 * Strip querystring from filename before rendering ODT files, ODT cannot handle querystrings in files.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs
index 03f8e8ba4..e216e616e 100644
--- a/src/Text/Pandoc/Writers/ODT.hs
+++ b/src/Text/Pandoc/Writers/ODT.hs
@@ -138,7 +138,8 @@ transformPicMath opts entriesRef (Image lab (src,_)) = do
let (w,h) = fromMaybe (0,0) $ sizeInPoints `fmap` size
let tit' = show w ++ "x" ++ show h
entries <- readIORef entriesRef
- let newsrc = "Pictures/" ++ show (length entries) ++ takeExtension src
+ let extension = takeExtension $ takeWhile (/='?') src
+ let newsrc = "Pictures/" ++ show (length entries) ++ extension
let toLazy = B.fromChunks . (:[])
epochtime <- floor `fmap` getPOSIXTime
let entry = toEntry newsrc epochtime $ toLazy img