From 7447ecc255af14971c9bb2e035aedb7e386e6aa0 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 13 Jul 2008 16:31:34 +0000 Subject: Escape '\160' as " ", not " " in XML. "nbsp" isn't a predefined XML entity. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1303 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/XML.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Text/Pandoc/XML.hs') diff --git a/Text/Pandoc/XML.hs b/Text/Pandoc/XML.hs index a09a8c150..14e2eebbb 100644 --- a/Text/Pandoc/XML.hs +++ b/Text/Pandoc/XML.hs @@ -38,12 +38,12 @@ import Text.PrettyPrint.HughesPJ -- | Escape one character as needed for XML. escapeCharForXML :: Char -> String escapeCharForXML x = case x of - '&' -> "&" - '<' -> "<" - '>' -> ">" - '"' -> """ - '\160' -> " " - c -> [c] + '&' -> "&" + '<' -> "<" + '>' -> ">" + '"' -> """ + '\160' -> " " + c -> [c] -- | True if the character needs to be escaped. needsEscaping :: Char -> Bool -- cgit v1.2.3