Escape '\160' as " ", not " " in XML.
"nbsp" isn't a predefined XML entity. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1303 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
2e4592b35b
commit
7447ecc255
2 changed files with 9 additions and 9 deletions
|
@ -38,12 +38,12 @@ import Text.PrettyPrint.HughesPJ
|
|||
-- | Escape one character as needed for XML.
|
||||
escapeCharForXML :: Char -> String
|
||||
escapeCharForXML x = case x of
|
||||
'&' -> "&"
|
||||
'<' -> "<"
|
||||
'>' -> ">"
|
||||
'"' -> """
|
||||
'\160' -> " "
|
||||
c -> [c]
|
||||
'&' -> "&"
|
||||
'<' -> "<"
|
||||
'>' -> ">"
|
||||
'"' -> """
|
||||
'\160' -> " "
|
||||
c -> [c]
|
||||
|
||||
-- | True if the character needs to be escaped.
|
||||
needsEscaping :: Char -> Bool
|
||||
|
|
|
@ -606,7 +606,7 @@ These should not be escaped: \$ \\ \> \[ \{
|
|||
Should not be a list item:
|
||||
</para>
|
||||
<para>
|
||||
M.A. 2007
|
||||
M.A. 2007
|
||||
</para>
|
||||
<para>
|
||||
B. Williams
|
||||
|
@ -795,12 +795,12 @@ These should not be escaped: \$ \\ \> \[ \{
|
|||
<para>
|
||||
Superscripts: a<superscript>bc</superscript>d
|
||||
a<superscript><emphasis>hello</emphasis></superscript>
|
||||
a<superscript>hello there</superscript>.
|
||||
a<superscript>hello there</superscript>.
|
||||
</para>
|
||||
<para>
|
||||
Subscripts: H<subscript>2</subscript>O,
|
||||
H<subscript>23</subscript>O,
|
||||
H<subscript>many of them</subscript>O.
|
||||
H<subscript>many of them</subscript>O.
|
||||
</para>
|
||||
<para>
|
||||
These should not be superscripts or subscripts, because of the
|
||||
|
|
Loading…
Reference in a new issue