aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-12-13 08:13:27 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-12-13 08:13:27 -0800
commit412580c22352b6f3278a4179deecc2b4beb1be1f (patch)
treeeeee090fc5155676db5838642d2ffe23d6105d60 /src
parentd8d68c51103beec39bc400d60a5c9281bf018945 (diff)
downloadpandoc-412580c22352b6f3278a4179deecc2b4beb1be1f.tar.gz
EPUB: Don't use any decimal entities.
kindlegen doesn't like them - even &#39;. It should be safe to use the unescaped ' character, since we know that all attributes are double quoted in the relevant files.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index 1bc9f0c9e..c3b0c95f2 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -284,8 +284,8 @@ ppTopElement = ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ++) . unEntity .
let (ds,ys) = break (==';') xs
rest = drop 1 ys
in case reads ('\'':'\\':ds ++ "'") of
- ((x,_):_) | x > '\127' -> x : unEntity rest
- _ -> ('&':'#':ds) ++ ";" ++ unEntity rest
+ ((x,_):_) -> x : unEntity rest
+ _ -> '&':'#':unEntity xs
unEntity (x:xs) = x : unEntity xs
imageTypeOf :: FilePath -> Maybe String