From 8fce9c54ece087311ccf3240b265f6b3c8144773 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 1 Jan 2010 04:12:06 +0000 Subject: XML: don't escape \160 (nonbreaking space) as an entity. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1770 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/XML.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/XML.hs b/src/Text/Pandoc/XML.hs index a5d0202e5..68c5c3c5c 100644 --- a/src/Text/Pandoc/XML.hs +++ b/src/Text/Pandoc/XML.hs @@ -53,12 +53,11 @@ escapeCharForXML x = case x of '<' -> "<" '>' -> ">" '"' -> """ - '\160' -> " " c -> [c] -- | True if the character needs to be escaped. needsEscaping :: Char -> Bool -needsEscaping c = c `elem` "&<>\"\160" +needsEscaping c = c `elem` "&<>\"" -- | Escape string as needed for XML. Entity references are not preserved. escapeStringForXML :: String -> String -- cgit v1.2.3