aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Entities.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Entities.hs b/src/Text/Pandoc/Entities.hs
index 0b77ea334..eaa1cd158 100644
--- a/src/Text/Pandoc/Entities.hs
+++ b/src/Text/Pandoc/Entities.hs
@@ -87,11 +87,12 @@ escapeSGMLChar x =
'<' -> "&lt;"
'>' -> "&gt;"
'"' -> "&quot;"
+ '\160' -> "&nbsp;"
c -> [c]
-- | True if the character needs to be escaped.
needsEscaping :: Char -> Bool
-needsEscaping c = c `elem` "&<>\""
+needsEscaping c = c `elem` "&<>\"\160"
-- | Escape string as needed for SGML. Entity references are not preserved.
escapeSGMLString :: String -> String