Escape non-breaking space in SGML as ' ' instead of

printing a unicode non-breaking space, which is
hard to distinguish visually from a regular space.
(Resolves issue #3.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@540 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher
2007-02-17 03:40:28 +00:00
parent 1855af4be5
commit 7a04caeea8
+2 -1
View File
@@ -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