git.iko.soy/typeable/pandoc
on master help sign in
XML: don't escape \160 (nonbreaking space) as an entity.
8fce9c5fiddlosopher
src/Text/Pandoc/XML.hs+1−2
@@ -53,12 +53,11 @@ escapeCharForXML x = case x of
53 '<' -> "&lt;"
53 '<' -> "&lt;"
54 '>' -> "&gt;"
54 '>' -> "&gt;"
55 '"' -> "&quot;"
55 '"' -> "&quot;"
56− '\160' -> "&#160;"
57 c -> [c]
56 c -> [c]
58
57
59-- | True if the character needs to be escaped.
58-- | True if the character needs to be escaped.
60needsEscaping :: Char -> Bool
59needsEscaping :: Char -> Bool
61−needsEscaping c = c `elem` "&<>\"\160"
60+needsEscaping c = c `elem` "&<>\""
62
61
63-- | Escape string as needed for XML. Entity references are not preserved.
62-- | Escape string as needed for XML. Entity references are not preserved.
64escapeStringForXML :: String -> String
63escapeStringForXML :: String -> String