git.iko.soy/typeable/pandoc
on master help sign in
HTML writer: Don't escape '.

This requires using a custom string escaper. If we use toHtml from Blaze, we get ', which is pointless unless you're writing attributes in single quotes.

commit1c521519d9d42eee19ce622467efda4583b768f9 authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 17 Dec 2011, 23:58 (15 years ago) parenteaa41a6
1 file changed+3−2
src/Text/Pandoc/Writers/HTML.hs+3−2
src/Text/Pandoc/Writers/HTML.hs+3−2
@@ -36,7 +36,7 @@ import Text.Pandoc.Shared
3636import Text.Pandoc.Templates
3737import Text.Pandoc.Readers.TeXMath
3838import Text.Pandoc.Highlighting ( highlightHtml, defaultHighlightingCss )
39−import Text.Pandoc.XML (stripTags)
39+import Text.Pandoc.XML (stripTags, escapeStringForXML)
4040import Network.HTTP ( urlEncode )
4141import Numeric ( showHex )
4242import Data.Char ( ord, toLower )
@@ -67,7 +67,8 @@ defaultWriterState = WriterState {stNotes= [], stMath = False, stHighlighting =
6767-- Helpers to render HTML with the appropriate function.
6868
6969strToHtml :: String -> Html
70−strToHtml = toHtml
70+strToHtml = preEscapedString . escapeStringForXML
71+-- strToHtml = toHtml
7172
7273-- | Hard linebreak.
7374nl :: WriterOptions -> Html