summaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-07-13 16:31:34 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-07-13 16:31:34 +0000
commit7447ecc255af14971c9bb2e035aedb7e386e6aa0 (patch)
tree50df9c24873a62ecbe2b558d9576644bb2286266 /Text
parent2e4592b35ba97d283c56afb89a87c1ea81e7510b (diff)
Escape '\160' as "&#160;", not "&nbsp;" in XML.
"nbsp" isn't a predefined XML entity. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1303 788f1e2b-df1e-0410-8736-df70ead52e1b
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
- '&' -> "&amp;"
- '<' -> "&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