From 1c521519d9d42eee19ce622467efda4583b768f9 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 17 Dec 2011 23:58:15 -0800 Subject: 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. --- src/Text/Pandoc/Writers/HTML.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 73d92225d..2c7874609 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -36,7 +36,7 @@ import Text.Pandoc.Shared import Text.Pandoc.Templates import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Highlighting ( highlightHtml, defaultHighlightingCss ) -import Text.Pandoc.XML (stripTags) +import Text.Pandoc.XML (stripTags, escapeStringForXML) import Network.HTTP ( urlEncode ) import Numeric ( showHex ) import Data.Char ( ord, toLower ) @@ -67,7 +67,8 @@ defaultWriterState = WriterState {stNotes= [], stMath = False, stHighlighting = -- Helpers to render HTML with the appropriate function. strToHtml :: String -> Html -strToHtml = toHtml +strToHtml = preEscapedString . escapeStringForXML +-- strToHtml = toHtml -- | Hard linebreak. nl :: WriterOptions -> Html -- cgit v1.2.3