aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-12-17 23:58:15 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-12-17 23:58:15 -0800
commit1c521519d9d42eee19ce622467efda4583b768f9 (patch)
tree4616bc7917f26ebdbf71d67977535dc0e461f2fa
parenteaa41a677a59fe6d245c6d8a64843230d6653e73 (diff)
downloadpandoc-1c521519d9d42eee19ce622467efda4583b768f9.tar.gz
HTML writer: Don't escape '.
This requires using a custom string escaper. If we use toHtml from Blaze, we get &#39;, which is pointless unless you're writing attributes in single quotes.
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs5
1 files changed, 3 insertions, 2 deletions
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