From 412580c22352b6f3278a4179deecc2b4beb1be1f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 13 Dec 2011 08:13:27 -0800 Subject: [PATCH] EPUB: Don't use any decimal entities. kindlegen doesn't like them - even '. It should be safe to use the unescaped ' character, since we know that all attributes are double quoted in the relevant files. --- src/Text/Pandoc/Writers/EPUB.hs | 4 ++-- 1 file 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 = ("\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