From 6c3d96a776310a6804c4e9b97df7dbd86450a303 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 28 Jan 2007 16:40:44 +0000 Subject: Changed 'encodeEntities' to 'escapeSGMLString'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@520 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/HTML.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Text/Pandoc/Writers/HTML.hs') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 8a654e3c9..a7ee9c0f3 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -32,7 +32,7 @@ module Text.Pandoc.Writers.HTML ( ) where import Text.Pandoc.Definition import Text.Pandoc.Shared -import Text.Pandoc.Entities ( encodeEntities ) +import Text.Pandoc.Entities ( escapeSGMLString ) import Text.Regex ( mkRegex, matchRegex ) import Numeric ( showHex ) import Data.Char ( ord, toLower ) @@ -127,11 +127,11 @@ htmlHeader opts (Meta title authors date) = then empty else selfClosingTag "meta" [("name", "author"), ("content", - joinWithSep ", " (map encodeEntities authors))] + joinWithSep ", " (map escapeSGMLString authors))] datetext = if (date == "") then empty else selfClosingTag "meta" [("name", "date"), - ("content", encodeEntities date)] in + ("content", escapeSGMLString date)] in text (writerHeader opts) $$ authortext $$ datetext $$ titletext $$ text "\n" @@ -168,7 +168,7 @@ blockToHtml opts (Note ref lst) = (text "↩") blockToHtml opts (Key _ _) = empty blockToHtml opts (CodeBlock str) = - text "
" <> text (encodeEntities str) <> text "\n
" + text "
" <> text (escapeSGMLString str) <> text "\n
" blockToHtml opts (RawHtml str) = text str blockToHtml opts (BulletList lst) = let attribs = if (writerIncremental opts) @@ -234,7 +234,7 @@ inlineToHtml opts (Emph lst) = inlineToHtml opts (Strong lst) = inTagsSimple "strong" (inlineListToHtml opts lst) inlineToHtml opts (Code str) = - inTagsSimple "code" $ text (encodeEntities str) + inTagsSimple "code" $ text (escapeSGMLString str) inlineToHtml opts (Quoted SingleQuote lst) = text "‘" <> (inlineListToHtml opts lst) <> text "’" inlineToHtml opts (Quoted DoubleQuote lst) = @@ -243,8 +243,8 @@ inlineToHtml opts EmDash = text "—" inlineToHtml opts EnDash = text "–" inlineToHtml opts Ellipses = text "…" inlineToHtml opts Apostrophe = text "’" -inlineToHtml opts (Str str) = text $ encodeEntities str -inlineToHtml opts (TeX str) = text $ encodeEntities str +inlineToHtml opts (Str str) = text $ escapeSGMLString str +inlineToHtml opts (TeX str) = text $ escapeSGMLString str inlineToHtml opts (HtmlInline str) = text str inlineToHtml opts (LineBreak) = selfClosingTag "br" [] inlineToHtml opts Space = space -- cgit v1.2.3