Use encodeEntities rather than stringToSGML for contents of
Str inline in Docbook and HTML writers, since now these
strings should not contain literal entity references.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@518 788f1e2b-df1e-0410-8736-df70ead52e1b
commit21484713c6745e56d92aecba620be44de8d32770
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateSat 27 Jan 2007, 22:58 (20 years ago)
parent8e0ad5a
src/Text/Pandoc/Writers/Docbook.hs+1−1
@@ -198,7 +198,7 @@ inlinesToDocbook opts lst = hcat (map (inlineToDocbook opts) lst)
198198
199199-- | Convert an inline element to Docbook.
200200inlineToDocbook :: WriterOptions -> Inline -> Doc
201−inlineToDocbook opts (Str str) = text $ stringToSGML str
201+inlineToDocbook opts (Str str) = text $ encodeEntities str
202202inlineToDocbook opts (Emph lst) =
203203 inTagsSimple "emphasis" (inlinesToDocbook opts lst)
204204inlineToDocbook opts (Strong lst) =
src/Text/Pandoc/Writers/HTML.hs+1−1
@@ -243,7 +243,7 @@ inlineToHtml opts EmDash = text "—"
243243inlineToHtml opts EnDash = text "–"
244244inlineToHtml opts Ellipses = text "…"
245245inlineToHtml opts Apostrophe = text "’"
246−inlineToHtml opts (Str str) = text $ stringToSGML str
246+inlineToHtml opts (Str str) = text $ encodeEntities str
247247inlineToHtml opts (TeX str) = text $ encodeEntities str
248248inlineToHtml opts (HtmlInline str) = text str
249249inlineToHtml opts (LineBreak) = selfClosingTag "br" []