aboutsummaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
Diffstat (limited to 'Text')
-rw-r--r--Text/Pandoc/XML.hs12
1 files changed, 6 insertions, 6 deletions
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
- '&' -> "&"
- '<' -> "&lt;"
- '>' -> "&gt;"
- '"' -> "&quot;"
- '\160' -> "&nbsp;"
- c -> [c]
+ '&' -> "&amp;"
+ '<' -> "&lt;"
+ '>' -> "&gt;"
+ '"' -> "&quot;"
+ '\160' -> "&#160;"
+ c -> [c]
-- | True if the character needs to be escaped.
needsEscaping :: Char -> Bool