Strip querystring in ODT write

* Resolve #1682
* Strip querystring from filename before rendering ODT files, ODT cannot
handle querystrings in files.
This commit is contained in:
Todd Sifleet 2014-10-28 18:45:36 -07:00
parent 93b82e8ea6
commit 8ad321d0d4

View file

@ -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